Regular Expression string replacement method, regular expression string
I have the following lines:
D: \ Projects \ qqq \ Development \ qqq. MySol1.sln
D: \ Projects \ qqq \ qqqDevelopment \ qqqMySol2.sln
D: \ Projects \ qqq \ Development \ MyInstaller. sln
D: \ Projects \ qqq \ Development \ MyInstaller. sln
D: \ Projects \ Development \ MyInstaller. sln
I need a regular expression, which will cause the Capture:
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
Therefore, a regular expression will remove (ignore) the word qqq from the row. I have been trying and adjusting, and there are some solutions:
Copy codeThe Code is as follows:
.*\\(? <A>. *) \. {3 }(? <B> .*)
This causes:
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
Therefore,. {3} should be fixed
1. I think the job should be:
.*\\(? : Qqq )? (? <A> .*)\\(? : Qqq )? (? <B> .*)