or, if you need to know the number, note the parens around the \d:
my $count; if (($count) = /see the (\d) brown foxes/) { print("There are $count foxes. Let's go hunting!$/"); }
Also, use \d+ if you want to match one or more digits, instead of just one.
In reply to Re^2: searching a string with variable data
by ikegami
in thread searching a string with variable data
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |