I would like to know if a single set of regex search/replace patterns could be used to replace all occurrences of a specific character inside a string contained within 2 tokens.
For example, is it possible to replace all periods with spaces for the text between TOKEN1 & TOKEN2 as in the example below?
So that:
TOKEN1:Run.Spot.run:TOKEN2
is changed to:
TOKEN1:Run Spot run:TOKEN2
NOTE: The regular expression would need to be capable of replacing any number of periods within any text, and not just the specific pattern above.
I ask this question more for my personal knowledge, as it is something I have wanted to do quite a few times in the past with various regex implementations. In this particular case, however, the regex would be in php.
I am not interested in php workarounds as I know how to do that. I am trying to expand my knowledge of regex.
Thanks