in reply to Re^2: Can you do "conjunctive" (overlapping) conditions in a single regexp?
in thread Can you do "conjunctive" (overlapping) conditions in a single regexp?
You can use the second version like you did before. Just put the (?=) around the whole thing and insert whatever you want for the pattern in the middle.
It is ugly but conceptually is not that bad. The first code pattern stores the position of the start of the match in $^R. The second one looks at the current position and the start (which is in $^R) and decides whether or not to make the match fail by interpolating in something that can't match. There are some complication around the logic, but that doesn't need to change.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Can you do "conjunctive" (overlapping) conditions in a single regexp?
by puterboy (Scribe) on Dec 18, 2008 at 05:52 UTC | |
by tilly (Archbishop) on Dec 18, 2008 at 19:37 UTC | |
by ikegami (Patriarch) on Dec 18, 2008 at 19:41 UTC |