Remove a certain phrase.
I want to remove any numerical patter that fits \d{3}\-\d{2}. I also want to remove OSIP. Sometimes OSIP and the number pattern may fall within parentheses, but not always. The data is very inconsistent. I also want to preserve other acronyms contained in parentheses. And, there are times when the numerical pattern appears outside of parentheses with or without the OSIP cue.
Help.
NAME | Desired Output | |
Cervelo R3 (R3D) (04-14) | Cervelo R3 (R3D) | |
Cervelo S3 (OSIP 09-13) | Cervelo S3 | |
Tesla Model 3 (OSIP 009-15) | Tesla Model 3 | |
BMW-800GSA (009-13) | BMW-800GSA | |
Cervelo S1 OSIP 10-32 | Cervelo S1 |
Solved! Go to Solution.
Brute force RegEx below. I'm not a RegEx expert, so there may be an easier way to do this.
(.*)(\s\(\d{2,3}\-\d{2}\)|\s\(*OSIP\s\d{2,3}\-\d{2}\)*)
Chris