避免匹配〜或$ [英] avoid matching ~ or $
本文介绍了避免匹配〜或$的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何符合此标准:
匹配
AAA123.xlsx
BBB123.xlsx
不匹配
~ $ AAA123.xlsx
以下似乎有效,但我怎样才能检查〜?
[^ \ $](AAA | BBB)123。*。xlsx
How do i meet this criteria:
Match
AAA123.xlsx
BBB123.xlsx
Don't Match
~$AAA123.xlsx
The below seems to work, but how can i check for the ~ ?
[^\$](AAA|BBB)123.*.xlsx
推荐答案
AAA123.xlsx
以下似乎有效,但我怎样才能检查〜?
[^ \
AAA123.xlsx
The below seems to work, but how can i check for the ~ ?
[^\
(AAA | BBB)123。*。xlsx
(AAA|BBB)123.*.xlsx
使用字符串开头和结尾字符串字符串指示符:
Use the start-of-string and end-of-string indicators:
^(AAA|BBB)123.*\.xlsx
这篇关于避免匹配〜或$的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文