The problem goes like this:
value match: 218\d{3}(\d{4})@domain.com replace with 10\1 to get 10 followed by last 4 digits for example 2181234567 would become 104567
value match: 332\d{3}(\d{4})@domain.com replace with 11\1 to get 11 followed by last 4 digits for example 3321234567 would become 114567
value match: 420\d{3}(\d{4})@domain.com replace with 12\1 to get 12 followed by last 4 digits ..and so on for example 4201234567 would become 124567
Is there a better way to catch different values and replace with their corresponding replacements in a single RegEx than creating multiple expressions?
Like (218|332|420)\d{3}(\d{4})@domain.com to replace 10\4|11\4|12\4) and get just their corresponding results when matched.
Edit: Didn't specify the use case: It's for my PBX, that just uses RegEx to match patterns and then replace it with the values I want it to go out with. No code. Just straight up RegEx in the GUI. Also for personal use, if I can get it to work with Notepad++