[Linux-disciples] Negative Perl Regexp
Chung-chieh Shan
ccshan at post.harvard.edu
Thu Jul 22 16:39:01 EDT 2004
On 2004-07-22T15:56:07-0400, Adam Rosi-Kessel wrote:
> I guess I'm not entirely sure why the . is in there, though. Based on
> experimenting just now, if I omit the . then the negative fails, I guess
> because (?!ab) means "not ab" but you need to have something else in
> there to match? I'm having trouble expressing this--is it that the
> (?!ab) collapses into nothingness for the purpose of the (?:) unit? Hmm.
(?!ab) means to check that there is no "ab" starting at the current
position (hence the term "negative lookahead assertion"). So, without
the . the regexp would mean, check that the string is comprised entirely
of empty strings where there is no "ab" starting.
> It's good to have you back, anyway.
Thanks!
--
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
Able was I ere I saw Elba.
An ole crab was I ere I saw Barcelona.
http://tinyurl.com/5rxn9 Ministry of Peace Bill
http://tinyurl.com/3rc7f Local Communities Sustainability Bill
-------------- 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/20040722/2b843390/attachment.pgp
More information about the Linux-disciples
mailing list