I have a series of characters that I want to match with a regular expression, and replace them with specific strings depending on what they are.
Example:
In
I recommend this, much shorter and uses a little memory : Another solution