We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
let reg = /^\d|\d$/g;//或 let reg2 = /^\d[\s\S]*\d$/g;//都
The text was updated successfully, but these errors were encountered:
function hasNumberAtStartAndEnd(str) { // 检查字符串开头是否包含数字 if (/\d/.test(str.charAt(0))) { return true; } // 检查字符串结尾是否包含数字 if (/\d/.test(str.charAt(str.length - 1))) { return true; } // 如果字符串既不以数字开头也不以数字结尾,则返回false return false; }
Sorry, something went wrong.
/^((\d.*)|(.*\d))$/
No branches or pull requests
The text was updated successfully, but these errors were encountered: