混淆正则表达式问题规则 [英] Confusion Regular expression problems rules
本文介绍了混淆正则表达式问题规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于互联网上正则表达式的例子很少..我对正则表达式有很多困惑.
[ab]正则表达式是什么意思
它是a,b还是类似a,b,aa,bb,aaa,bbb ............
和
[0-9]仅是0、1、2、3、4、5、6、7、8、9吗?或0,1,2,3,4,5,6,7,8,9,10,11,12 ....
正则表达式中的^和$是什么意思?
Due to so much less examples of regular expression on internet.. i have lots of confusion in regular expression.
[ab] what is the meaning of it in regular expression
it it a,b or its like a,b,aa,bb,aaa,bbb............
and
[0-9] is it like 0,1,2,3,4,5,6,7,8,9 only ?? or 0,1,2,3,4,5,6,7,8,9 ,10,11,12....
and what is the meaning of ^ and $ in regular expression??
推荐答案
正则表达式中?
您的困惑是当然.让我设法消除您的困惑.
[..]:-表示它具有要匹配的显式字符集.
^:-表示字符串的开头.
your confusion are for sure. let me try to remove your confusion.
[..] :- it means it has explicit set of character to match.
^ :- it means start of string.
:-表示字符串的结尾.
还有更多类似的内容-
\:-在上方或下方之一之前.
. :-除换行符(\ n)外的任何字符.
| :-交替.
:- it means end of string.
there are more like--
\ :- preceding one of the above or down.
. :- any character except new line(\n).
| :- alternation.
这篇关于混淆正则表达式问题规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文