|
Boost Users : |
From: Gregory Nisnevich (gregnis_at_[hidden])
Date: 2005-07-15 10:30:39
Thanks. It's OK, I can use mutiple dots for now. I just wanted
to make sure that I didn't make a stupid mistake in
(?<=^.{2}).{4}
-Gregory
--- John Maddock <john_at_[hidden]> wrote:
> > I'm trying to use lookbehind assertions, and here's a problem: the
> > following syntax
> >
> > (?<=^.{2}).{4}
> >
> > gives me the error:
> >
> > '(?<=^.{2}).{4}' is a bad regular expression: Unmatched [ or [^
> >
> > while the following works:
> >
> > (?<=^..).{4}
> >
> > matching, as I expected, 4 characters after the first 2 characters
> > in a line.
> >
> > Shouldn't the above two regexes work the same way?
>
> Probably, but the lookbehind assertion code is pretty dumb at present: it
> needs to be able to figure out exactly how many characters to look behind in
> advance, and currently bounded repeats aren't supported. It's probably not
> too hard to support that case, but it's too late for 1.33 I'm afraid.
>
> John.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net