问到正则表达式里的加号代表什么含义,作为写正则表达式的时候临时查语法的老年开发者的我来说,决定开始记录一些平常遇到的问题。
What’s the meaning of plug sign in Regular expression?
“When an ERE(Extended Regular expressions) matching a single character or an ERE enclosed in parentheses is followed by the special character ( ‘+’ ), together with that it shall match what one or more consecutive occurrences of the ERE would match. For example, the ERE “b+(bc)” matches the fourth to seventh characters in the string “acabbbcde”. And, “[ab]+” and “[ab][ab]*” are equivalent.“[1]
所以代表的是匹配加号(+)之前的正则表达式1次或多次。
例如: [0-9]+可以匹配一位以上的数字 [A-Z]+可以匹配一位以上的大写英文字符 (ABC)+则可以匹配连续的ABC字符串。 还有上述的 [ab]+和[ab][ab]*等价
热门信息
阅读 (213)
1 网站建设经验大总结阅读 (184)
2 如何对图片进行SEO优化阅读 (174)
3 网站:老站的优劣势方法阅读 (163)
4 有哪些靠谱点的网上兼职工作?阅读 (155)
5 https站点该如何优化?