正则表达式:如果我在括号的末尾而不是在开头使用“ ^”

时间:2019-12-12 17:44:25

标签: regex grep

我试图了解使用之间的区别:

grep [^klm]fair - This matches any single character not in the string ‘klm’ - k or lm or km - followed by any string that has the text ‘fair’ in it

grep [kl^m]fair - I am not sure what this means. I want to assume that it means - matches any single character in string which includes k,l NOT m, followed by any string that has the text 'fair' in it....

对吗?

0 个答案:

没有答案