http://qs321.pair.com?node_id=929881


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); } }