in reply to Re: parsing question
in thread parsing question

I would love to know why you did what you did with that regex. There are probably a lot of monks in the Monastery who could learn something from you and just need a little push in the right direction. :)

--
Allolex

Replies are listed 'Best First'.
Re: parsing question
by Abigail-II (Bishop) on Sep 12, 2003 at 13:13 UTC
    #!/usr/bin/perl use strict; use warnings; while (<DATA>) { chomp; print "with (?>): '$_' matches\n" if /_test(?>\s+)(?!<)/; print "without (?>): '$_' matches\n" if /_test\s+(?!<)/; } __DATA__ _test foo _test < _test < _test<

    Running this gives:

    with (?>): '_test foo' matches without (?>): '_test foo' matches without (?>): '_test <' matches

    Abigail