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.
我需要找出与此类似的文件
1234-JOHN-ebook.pdf 98749-RAJ-test.epub
是否有任何与此格式匹配的正则表达式?
如果大写始终如您的示例中那样:\d+-[A-Z]+-[a-z]+\.[a-z]+ 如果不是,则可以\d+-\w+-\w+\.\w+。
\d+-[A-Z]+-[a-z]+\.[a-z]+
\d+-\w+-\w+\.\w+
请注意,您可能需要转义破折号 (\-)