I am new to regex and I spent half of my day to solve this question. I tried to search for answers, but couldn't find similar example.
I need to match strings if their end does not include char combinations such as (L|R|MIR)..
My tries:
1234.567.89.w001.*(?!R|L|MIR)\.dwg
1234.567.89.w001[^.]*(?!R|L|MIR)$\.dwg
and more..
Possible outcomes:
- 1234.567.89.w001.dwg TRUE
- 1234.567.89.w001 some random extensions.dwg TRUE
- 1234.567.89.w001-MIR some random text or no.dwg FALSE (MIR included after base name)
- 1234.567.89.w001_L.dwg FALSE (L included after base name)
- 1234.567.89.w001-R.dwg FALSE (R included after base name)
- 1234.567.89.w001R.dwg FALSE
- 1234.567.89.w001MIR.dwg FALSE