I've got these strings I want to parse:
?forum=Jiné akce a jiné#comments
?trening=140#$|Pralinka
?novinka=87#comments
?forum=Mimo mísu#comments
?forum=Členské forum#comments
?trening=139#comments
and I want to output array like
1. forum
2. Jiné akce a jiné
3. comments
or
1. trening
2. 140
3. Pralinka
So I wrote following regexp:
\?([a-z]{4,})\=(.+)\#(\$\|)?([a-z]+)
But It's not working in second case (optional string part).