(Again, this is not to resurrect the whole thread; we're just noodling
around with RE syntax.)
According to Andy Wardley:
Chip:
OTOH, all things being equal, I'd favor adding escape sequences
instead of adding new interpretations for existing characters and then
requiring new flags on the REs that use them.
Fair enough. I wonder then if Ilya's suggestion of extending the
syntax inside the braces, rather than using \m and \M is worth
investigating?
\m{?= bold}
\m{?! bold?
\m{?< bold}
\m{?<! bold}
Well, I'd like to think we could dispense with the question marks.
OTOH, if were to mean _switch_ to the metadata stream, then:
(?=\mbold)
(?!\mbold)
(?<\mbold)
(?<!\mbold)
Or even add the 'm' after the '?' in a regular assertion:
(?m= bold)
(?m! bold)
(?m< bold)
(?m<! bold)
Yes, that's got potential as well.
--
Chip Salzenberg - a.k.a. - <chip(_at_)perlsupport(_dot_)com>
"There -- we made them swerve slightly!" //MST3K