How to catch in PHP in the text with regex such a bbcode which has 2 possible constructions at once
[gcountry allow="XX,YY"] Text Here [/gcountry]
[gcountry deny="AA,BB"] Text Here [/gcountry]
???
I need to find it, and regarding to IP address detect the country and replace the whole text with a Text Here if the country user comes from is an allowed one. The whole problem to find out such bbcode and parsed to have allow and deny values also.