Regex - find only replace occurences not touching some of them
- by vittore
Not very good at regex though and maybe that's a stupid question,
I'm given string like "bla @a bla @a1 bla "
I'm also pairs like {"a", "a2"} , {"a1", "a13"}, and am to replace @a to @a2 for first pair, and @a1 to @a13 for second one.
The problem is when i use string.replace and look for @a , it also replaces @a1 but it should not.
Help me with regex replace, please.
Cheers