Hi,

New messages are coming in as I write.  Thanks to all.
My error was in assuming that because '.' is a metacharacter, the match
must start with the initial 's'. However as was pointes out (and in
retrospect, it makes perfect sense, the regexp engine is looking for
any single character before the 'n' - so a match.

I have until Monday to formalize an apology to my class or else be
trampled by an irate camel.

WINDOWS: 32 bit extensions and a graphical shell for a 16 bit patch to an
8 bit operating system originally coded for a 4 bit microprocessor,
written by a 2 bit company that can't stand 1 bit of competition.


On Thu, 7 Jun 2001, Jeff 'japhy' Pinyan wrote:

> On Jun 7, Martin Weinless said:
>
> >take the regexp '.n+..?.?v*.'
> >
> >By all that is sacred, if we use the string 'supernova', there should be
> >no match since there are too many characters before the 'n'
> >
> >However, any regexp checking code will report a match.
>
> You're not saying "the string must start with /.n+..?.?v*./".  To do that,
> you have to say /^.n+etc/.
>
> --
> Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
> I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
> Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
> Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
> Acacia Fraternity, Rensselaer Chapter.         Brother #734
> **      Manning Publications, Co, is publishing my Perl Regex book      **
>
>

Reply via email to