in reply to Re: Regex matching after ASCII characters
in thread Regex matching after ASCII characters
Thanks for your quick response, I tried your code and am getting the same false positives.
Example: $prompt_host = "BR|GR", filenames such as: YUGRABCKFI01-1.1.1.1_2011.10.04.00.00.00.txt and GRREPCCOBE10-1.1.1.1_2011.10.04.00.00.00.txt are erroneously being pushed. Here is how I implemented your code:
while (my $file = readdir(DIR)) { if($file =~ m{ \A [A-Z0-9]{8} $prompt_host }xms) { push(@traffic_file_list, $file); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regex matching after ASCII characters
by elTriberium (Friar) on Oct 05, 2011 at 21:36 UTC | |
by Anonymous Monk on Oct 05, 2011 at 21:41 UTC | |
|
Re^3: Regex matching after ASCII characters
by AnomalousMonk (Archbishop) on Oct 05, 2011 at 22:18 UTC |