[Linux-disciples] Perl: displaying the part of a match that failed

Stephen R Laniel steve at laniels.org
Fri Jun 24 16:19:46 EDT 2005


On Fri, Jun 24, 2005 at 04:14:39PM -0400, Chung-chieh Shan wrote:
> I don't understand what "the part of the file that failed to match"
> means.  What part of "abcde" failed to match /^.*f.*$/ ?

Good point; it was unclear on my part. What I mean is "on
what part of the pattern did the regex parser fail and
decide that the string didn't match the pattern?" In the
above, the string matches up to the end of the first '.*'
and fails at 'f'. So in my dreamworld, Perl would say, "CSS
parsing failed at

elemName {
	font-fcae: Times New Roman;
}

because there is no property 'font-fcae'."

Is that any clearer?

-- 
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20050624/7d217e16/attachment.pgp


More information about the Linux-disciples mailing list