Basically, I am trying to construct a substitute expression that accomplishes the following: given all occurrences of a certain type of string (for instance, digits), insert some prefix or suffix before or after all occurences.
For example, in the string --12***345)))6789?<>, I want to insert some prefix before the numeric substrings, to give e.g. --found12***found345)))found6789?<>
Now, the regular expression
s/[0-9]*/found/g would find all strings of digits and replace them with the word "found." However, I want to keep the substrings of numbers and insert a prefix. What do I need to do?
Thanks, Max
For example, in the string --12***345)))6789?<>, I want to insert some prefix before the numeric substrings, to give e.g. --found12***found345)))found6789?<>
Now, the regular expression
s/[0-9]*/found/g would find all strings of digits and replace them with the word "found." However, I want to keep the substrings of numbers and insert a prefix. What do I need to do?
Thanks, Max