Your additions to the regex make it unsafe because they are not terminated with $.Try
poj#!perl use strict; my @ids = qw( spam-IUiA-_bUe0eN.gz badh-Xh-Vzy9BSsHN banned-8KuHlZuzBCaA virus-gUS5QeJ_ayqZ virus-gUS5QeJ_ayqZ;stopme ); for my $id (@ids){ if ($id =~ /^(?:spam|badh|banned|virus)-[a-zA-Z0-9-_.]+$/) { print "OK : $id\n"; } else { print "ERROR : Invalid id '$id'\n"; } }
In reply to Re^11: INSERT file contents inside a table
by poj
in thread INSERT file contents inside a table
by theravadamonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |