[sf-perl] Plucking from a string

yary not.com at gmail.com
Fri May 23 07:47:22 PDT 2008


On Fri, May 23, 2008 at 7:30 AM, Neil Heller <nheller at silcon.com> wrote:
> Just one more question…
>
>
>
> In the line:
>
> while ($theline =~ /($TARGETSTR\d+)/gi) {  print "$1\n"; }
>
>
>
> why is the d+ escaped?

Try it without the backslash, and then try replacing the numbers in
the input with the letter "d". It's an eye opener!

Perhaps the command "perldoc perlre" isn't working on your system (bad
install?)- so try this page-
http://www.perl.com/doc/manual/html/pod/perlre.html
and search for "\d"

-y


More information about the SanFrancisco-pm mailing list