I am really stuck with the following regex problem:
I want to remove the last piece of a string, but only if the ‘-‘ is more then once occurring in the string.
BOL-83846-M/L -> Should match -M/L and remove it
B0L-026O1 -> Should not match
D&F-176954 -> Should not match
BOL-04134-58/60 -> Should match -58/60 and remove it
BOL-5068-4 – 6 jaar -> Should match -4 – 6 jaar and remove it (maybe in multiple search/replace steps)
It would be no problem if the regex needs two (or more) steps to remove it.
Now I have
But in sublime it matches B0L-026O1 and D&F-176954
Need your help please
Read more here: Source link