I have a set of strings with each string containing letters, numbers & symbols. I would like to extract the contents of a string until the occurrence of a number & preceding symbol. Here is an example:
replaceFirst("[-+.^:,_]\d.*", "") should do what you want.
You can read that as "a 'symbol' followed by a digit followed by everything else in the string."