Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何搭配
aby_<ANYTHING>.csv xyz_<ANYTHING>.csv
但不是
aby_<ANYTHING>_Result.csv xyz_<ANYTHING>_Result.csv
而<ANYTHING>可以是使用正则表达式的任何字符串?
<ANYTHING>
怎么样 :
'^(aby|xyz)_.*?(?<!_Result)\.csv$'
你可以试试正则表达式
^.*(?!_Result)\.csv$
这将匹配任何一系列字符,然后不是字符串“_Result”,然后是字符串“.csv”。它还将期望匹配整个字符串。