in reply to Re^6: Regex Tool
in thread Regex Tool
Did you test your claim at all?
use strict; use warnings; while (<DATA>) { chomp; my $matched = /\<hell/ ? 'yes' : 'no'; print "/\\<hell/ matches '$_'? $matched\n" } __DATA__ shell hell this is hell this is hellish this is <hell this is <hellish some shells are bad
When run, this prints
Q:\>perl -w tmp.pl 'shell' matches? no 'hell' matches? no 'this is hell' matches? no 'this is hellish' matches? no 'this is <hell' matches? yes 'this is <hellish' matches? yes 'some shells are bad' matches? no
Please read perlre before making such claims.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Regex Tool
by a (Friar) on Jul 04, 2006 at 14:12 UTC |