Something like this:
/[abcd]/[efgh]/
The idea is that a will get replaced with e, b with f, c with g and so on.
Ideally, this should be language independent. If that isn't possible, I have an alternate solution (because this regex is generated by some code, I can make one for each of the possible replacements).
In perl, tr performs character replacement:
tr/abcd/efgh/
Will do what your example suggests.
In sed, the y/// expression does just that.
It's also a synonym for tr/// in perl
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With