I need to find 1 or more specific groups of characters enclosed in parentheses. If more than one group is present, it will be separated by a hyphen.
Example:
(us) (jp) (jp-us) (jp-us-eu)
I figured out how to find a group if the line contains only one group:
/\(us\)|\(jp\)/
However, I get confused when it comes to finding more than one, separated by hypnosis and in any particular order: (us-jp) OR (jp-us)
Any help is appreciated.
Thanks Simon
php regex find search
simonwjackson
source share