in reply to Re: searching a string with variable data
in thread searching a string with variable data
or with capturing (like ikegami pointed out)if ( /see the \d brown foxes\. they are \w+ fast\./ ) { # do something }
my ($count, $word); if (($count, $word) = /see the (\d) brown foxes\. they are (\w+) fast\ +./) { print("There are $count foxes. Let's go hunting!$/"); }
|
|---|