Hey everyone,
I need to find 1 or more defined groups of characters enclosed in parentheses. If more than one group is present it will be separated with a hyphen.
Example:
(us)
(jp)
(jp-us)
(jp-us-eu)
I've figured out how to find the group if the string only contains one group:
/\(us\)|\(jp\)/
However, I am baffled when it comes to finding more than one, separated by a hypen and in no particular order: (us-jp)
OR (jp-us)
Any help is appreciated.
Thanks, Simon