gnu-regexp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Regexp] Finding out where/why isMatch failed


From: mitch-GNU RegExp List
Subject: [Regexp] Finding out where/why isMatch failed
Date: Mon, 28 Jun 2004 16:08:17 -0500

Using the gnu.regexp package, is there a way to find out where in the input
string the matching process failed?  I envision an index or something that
would show the first position in the input that could not be matched (or
perhaps, but less useful, the last position that was successfully matched).

Background:  I use a system based on regular expressions to evaluate certain
emails and make automatic status updates to a database based on the
contents.  Many times when the regular expression does not match (isMatch()
== false) the problem is with the regular expression not the input.  With
some of the regular expressions being quite complicated it is often
difficult or impossible to find out exactly where the mismatch occurred.


Mitch Claborn




reply via email to

[Prev in Thread] Current Thread [Next in Thread]