the second row match if all count(x)s are found, but only in this order. For a variable order I must all possibilities define.
other question:
How can I match all round brackets pairs in a string ?
str = "(count1|count2)&(count3|(count4&count5))"
preg_match_all should content:
"(count1|count2)"
"(count3|(count4&count5))"
"(count4&count5)"
but not other.