Greg Smith wrote:
In my app, I would like to be able to let the user know that the regular
expression they are offering up is rubbish, and give them a clue as to why...
It would be nice (but would cause compatibility problems with apps that
chaecked for a return of -1 rather than <0) if we returned numbers less than -1
when searches failed due to RE errors.
Alternatively (and maybe more compatible), there could be be an addition search
flag that allowed us to use search and replace in a "do nothing except check RE
search and replace strings" mode.
Any thoughts?
As you probably know, the regular expression library Scintilla uses
return short diagnostic strings when it meets a parsing error. I don't
know yet if these strings are used somewhere.
I am studying this library in the hope of bringing some small improvements.
Note that this library is public domain and very small. You can even
trim it down to its parser and integrate it to your application. It
doesn't even has to store the compiled expression. This way, you can
submit the RE to your parsing function and see what error is returned.
The parser is easy to understand...
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest