Reposted (Anonymous): JavaScript regular expression test page

zhaozj2021-02-16  66

Repost (Anonymous): JavaScript Regular Expression Test Web Page How do you test regular expressions? Write directly in the code of the large segment, then wait for the program to run there, then use the ALERT display result? Or temporarily write a page, lose it after the test is complete? You can try my page, although it is rough, but the test regular expression is also enough :)) First, explain: 1. My intention is AC. I am very dish. Therefore, there will be shortcomings in the code. 2. The code can be arbitrarily modified. If you think that the code you modified is better than me, you can post it, I am very grateful. 3. My norms to JavaScript are not familiar. My experience comes from development. Therefore, if you have a better insight, welcome, I am very grateful. Second, test case: 1. Check if there is a non-figures in the string: Test Regex: 1234G56T78 2. Check the string is not 0-9, A ~ Z, AZ, _ Character: Test Regex: / wartest regex flags: gtest string: I'm a pig! Yes i'm! 3. Match the real number in the string: Test Regex: ([/D] ] )/. ([////// D] ) Test Regex Flags: gtest string: float1234.58.723c65.183 Third, program code: < Title> JavaScript Regex Test Page