DDR爱好者之家 Design By 杰米

我有以下几行:

d:\Projects\qqq\Development\qqq.MySol1.sln
d:\Projects\qqq\qqqDevelopment\qqqMySol2.sln
d:\Projects\qqq\Development\MyInstaller.sln
d:\Projects\qqq\qqq\Development\MyInstaller.sln
d:\Projects\Development\MyInstaller.sln

我需要一个正则表达式,这将导致捕获:

Line 1: Development and MySol1.sln
Line 2: Development and MySol2.sln
Line 3: Development and MyInstaller.sln
Line 4: Development and MyInstaller.sln
Line 5: Development and MyInstaller.sln

因此,一个正则表达式,将删除(忽略)字qqq从行。 我一直在试图与调节,并有部分的解决方案:

复制代码 代码如下:
.*\\(?<A>.*)\\.{3}(?<B>.*)

这导致:

Line 1: Development and .MySol1.sln
Line 2: qqqDevelopment and MySol2.sln
Line 3: Development and nstaller.sln
Line 4: Development and nstaller.sln
Line 5: Development and nstaller.sln

因此,.{3}应固定

1.我认为,应该工作:

.*\\(?:qqq)?(?<A>.*)\\(?:qqq)?(?<B>.*)

DDR爱好者之家 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
DDR爱好者之家 Design By 杰米