#!/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
In reply to Re: parsing question
by Abigail-II
in thread parsing question
by Washie101
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |