It is a headache for regular expressions, isn't it? Every time I see it, I think it's like reading tianshu. Don't let people come out on their own. The following website can help you generate regular expressions and generate different code examples based on different languages, which is very powerful.
Http://www.txt2re.com/index.php3
Open the page above and you will see three steps.
- Step 1: Output A text example that you want to match, click "Show Machted", and enter the second point.
- Step 2, when you see that the colorful interface is not too big (the color is terrible), it will split every character in your string, separate words. Therefore, you can click the links between the green grids to organize your regular expressions ., For example, c represents any character, and there are other int, day, and string streams. (Quite ugly Interface) in this step, you need something, otherwise you will not enter the third step.
- Step 3: select a programming language, and then you can see the relevant code example. Language Support: Perl PHP Python Java Javascript ColdFusion C ++ Ruby VB VBScript J #. net C #. net C ++. net VB.net (so many)
In short, this is a cool, but ugly online Regular Expression generation tool.
Source: http://coolshell.cn/articles/tag/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F