Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2005-02-14 06:24:08


> With my undefined funtion I would obtain:
>
> - Input text:"123 hello abc"
> - Latest rigth Regular expression: "(\d)+\s+(\w)+\s+" Matches: "123 hello
> "
> - First wrong regex: "(\d)+\s+(\w)+\s+(\d)+" does not match.
>
> -> So, "(\d)+" does not match "abc"
>
> I understand that usually this is not as easy as I write in my simple
> example because of the power of regular expressions but I think a function
> like that would improve a lot the error reporting capabilities. Is there
> any way to do what I need or I must to write my own check function?

That would indeed be useful: actually what we really need is a regular
expression debugger, but both need a fully instrumented regex engine to
associate states in the machine with characters in the original expression
(so you know where the failure occurred).

I'm afraid there's no way to do what you want at present, it's always been
on my TO-DO list, but never seems to have surfaced !

John.


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