in reply to Regex Optional capture doesn't
But the regex is forced to backtrack if <(\w+TagIwant\b) is not optional otherwise it concludes happily.
Changing to .+? should solve this.
just tested, not my day. declaring myself officially (mentally) ill.
an elegant solution is buried at the end of this discussion here
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex Optional capture doesn't
by NetWallah (Canon) on Oct 05, 2017 at 16:39 UTC | |
by LanX (Saint) on Oct 05, 2017 at 16:47 UTC | |
by LanX (Saint) on Oct 05, 2017 at 16:55 UTC | |
by NetWallah (Canon) on Oct 05, 2017 at 17:40 UTC | |
by LanX (Saint) on Oct 05, 2017 at 17:47 UTC | |
|