in reply to Newbie regex question
If that's not the problem, then you should show us a small sample of your input file.use strict; use warnings; my $text = 'birthdate1234zodiac'; if ($text =~ /birthdate(.*?)zodiac/i) { my $birthdate = $1; print "$birthdate\n"; } __END__ prints: 1234
You would also benefit from running your code through perltidy and perlcritic.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Newbie regex question
by Anonymous Monk on Jan 15, 2011 at 17:05 UTC |