LINK OF ATTEMPT ON REGEX101:
https://regex101.com/r/lrBKfd/2[
^]
I have the following code to identify one or more groups of text inside of parentheses (along with the parentheses):
\((?!([^)]*\b(ARR)\b[^(]*)).*?\)
I've tried to add a Positive Lookbehind Assertion so it would only identify text enclosed in parentheses when preceded by specific pattern:
(?<=NA - FY\d\d [A-Z][A-Za-z][A-Z]|(?<=NA - FY\d\d [A-Z][A-Z][A-Z][A-Z])) \((?!([^)]*\b(ARR)\b[^(]*)).*?\)
Here is some sample folder names I am using to test the Expression:
NA - FY17 JCIG (Joint Coord Integration Grp) briefs
NA - FY17 JIPT (Joint Integr Product Tm) briefs
NA - FY17 SoW (Statement of Work)
NA - FY17 SRRB (Serv Requi Review Brd) Quad chart
NA - FY17 UFR (Unfunded Plan) - CYD (Current Year)
NA - FY17 DR (Directors Reviews) briefs
NA - FY17 PP (Phasing Plans)
NA - FY17 Funding Docs
MVSOT (Maritime Vessel)
It's doing what I want by not capturing the parentheses in the last 4 lines of text. Problem is it's not capturing both groups of text enclosed in parentheses in the line above them. In that line of text
NA - FY17 UFR (Unfunded Plan) - CYD (Current Year)
it no longer captures the 2nd group of text in parenthesis. I was given the Regex that captures the text in parentheses so I'm not entirely sure how it works but I'm pretty sure the Positive Lookbehind Assertion is correct. Can anyone please tell me what I am missing?
What I have tried:
LINK OF ATTEMPT ON REGEX101:https://regex101.com/r/lrBKfd/2[^]
Have tried negative look behind ((?