テストデータ
1: "Abc.TestCase For TestCase By Abc.TestCase Using TestCase" --> 2 matches
2: "(Abc.TestCase For TestCase By Abc.TestCase Using TestCase)" --> 2 matches
3: "(TestCase For TestCase By Abc.TestCase Using TestCase)" --> 3 matches
4: "(Abc.TestCase For TestCase By Abc.TestCase Using Xyz.TestCase.Sub)" --> 1 match
5: "(Abc.TestCase For TestCase By Abc.TestCase Using Xyz.TestCase1)" --> 1 match
ターゲットは、未修飾の「TestCase」を取得することです
以下を試しました
[^.]\bTestCase\b[^.]
これは機能しますが、一致として "(TestCase" "TestCase)" を返す 2 & 3 ケースで失敗し、置換で誤った結果を導きます。
これで終わりです!
ここで助けていただければ幸いです。