Hello alchemiz,
Thanks a lot for your suggestion, however I'm already using regex patterns (a few actually). More precisely, I'm looking for a way to maybe store the patterns in an associative array, and loop them all to apply them all on the same string. Having the patterns (regex and fixed strings) in an associative array would greatly help with maintenance when more patterns are required.
Example of what I mean (the real list is much longer):
{
"Jan." : "January",
"Feb." : "February",
"Mon." : "Monday",
"<sup>(.*)</sup>" : "\1",
"otherRegex" : "replace text"
}
Is there a way to store the strings to replace (including regex) in a structure as above and loop through it to have all the replacements done?
Thanks,
JF