T
Thomas Werzmirzowsky
Hi,
i need a regular expression that matches (for example) the following
strings:
$$[mark] fkajdfka $$[/mark]
$$[ mark ] dfalkdfj $$[ /mark ]
$$[abc ] dkjfakldf $$[ / abc ]
and so on.
To do this i "designed" this regular expression (spaces are just for
better reading):
\$ \$ \[ \s* (.+?) \s* \] .+? \$ \$ \[ \s* \/ \s* \1 \s* \]
And it works
But now i want that befor the <mark> in the first $$[ ] can be a !.
So i changed my expression to:
\$ \$ \[ \s* (!?) \s* (.+?) \s* \] .+? \$ \$ \[ \s* \/ \s* \2 \s* \]
And it doesn't work
I even tried (\!?) instead of (!?) but this doesn't work, too
Can anybody tell me why the second expression doesn't work?
Thanks in advance
Thomas W
i need a regular expression that matches (for example) the following
strings:
$$[mark] fkajdfka $$[/mark]
$$[ mark ] dfalkdfj $$[ /mark ]
$$[abc ] dkjfakldf $$[ / abc ]
and so on.
To do this i "designed" this regular expression (spaces are just for
better reading):
\$ \$ \[ \s* (.+?) \s* \] .+? \$ \$ \[ \s* \/ \s* \1 \s* \]
And it works
But now i want that befor the <mark> in the first $$[ ] can be a !.
So i changed my expression to:
\$ \$ \[ \s* (!?) \s* (.+?) \s* \] .+? \$ \$ \[ \s* \/ \s* \2 \s* \]
And it doesn't work
I even tried (\!?) instead of (!?) but this doesn't work, too
Can anybody tell me why the second expression doesn't work?
Thanks in advance
Thomas W