How to test a regular expression and a regular expression
When we write a regular expression, we are eager to verify whether it is correct. Sometimes, we need to modify and verify it repeatedly to write a more accurate and perfect regular expression, at this time, a good regular expression testing tool is very necessary. This article will summarize from the following aspects.
Two easy-to-use regular expression testing tools
1, RegexTester
This tool was developed by deerchao: http://deerchao.net/tools/regex_tester/index.htm
2, MTracer
This tool is also very powerful, and you can search online.
Online testing tools
Here I also recommend two very good online RegEx testing sites.
1, http://www.regexpal.com/
2, http://rubular.com/
If you have other useful tools, update them later...
In jquery, how can I use a regular expression to test whether a string is a number?
Function shuzi (str ){
Var s =/^ [0-9] * $ /;
Return s. test (str );
}
In jquery, how can I use a regular expression to test whether a string is a number?
Function shuzi (str ){
Var s =/^ [0-9] * $ /;
Return s. test (str );
}