How can I match something like "AB|CD|EF" followed by "12|34" and get, for instance, "AB12" back? If the string was "zzAB34zz" I’d get "AB34", "zzABCD12" and get "CD12", etc?
How can I match something like AB|CD|EF followed by 12|34 and get, for instance,
Share
No need for named groups here, really: