Hi,
I'm trying to match a string like this: {{name|arg1|arg2|...|argX}} with a regular expression
I'm using preg_match with
/{{(\w+)\|(\w+)(?:\|(.+))*}}/
but I get something like this, whenever I use more than two args
Array
(
[0] => {{name|arg1|arg2|arg3|arg4}}
[1] => name
[2] => arg1
[3] => arg2|arg3|arg4
)
The first two items cannot contain spaces, the rest can. Perhaps I'm working to long on this, but I can't find the error - any help would be greatly apreciated ;)
Thanks in advance, Jan