正则表达式 最后一次出现? [英] Regex Last occurrence?
本文介绍了正则表达式 最后一次出现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图抓住最后一个反斜杠后的最后一部分
我需要 Web_ERP_Assistant
(带有 )
I'm trying to catch the last part after the last backslash
I need the Web_ERP_Assistant
(with the )
我的想法是:
C:ProjectsEnsure_SolutionAssistanceApp_WebReferencesWeb_ERP_WebServiceWeb_ERP_Assistant
\.+?(?!\) // I know there is something with negative look -ahead `(?!\)`
但是我找不到.
推荐答案
您的否定前瞻解决方案将例如是这样的:
Your negative lookahead solution would e.g. be this:
\(?:.(?!\))+$
这篇关于正则表达式 最后一次出现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文