Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
Why does my regular expression not work?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Thomas Werzmirzowsky, post: 4795374"] 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 [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Why does my regular expression not work?
Top