Dec 28, 2004 #1 veteq Technical User Dec 7, 2004 23 CA I need some help with this "string match" ( $ans_quantity !~ /^[0-9]{3}d/) what I am trying to do is for the user to enter a min of 1 numeric digit and not more that 3 numeric digits (not allowing alpha numeric characters) thank you... Veteq
I need some help with this "string match" ( $ans_quantity !~ /^[0-9]{3}d/) what I am trying to do is for the user to enter a min of 1 numeric digit and not more that 3 numeric digits (not allowing alpha numeric characters) thank you... Veteq
Dec 28, 2004 #2 effennel Technical User Oct 15, 2002 60 CA There is possibly a more elegant way to put it, but this works: ($ans_quantity !~ /^[0-9]$|^[0-9]{2}$|^[0-9]{3}$/) FNL Upvote 0 Downvote
There is possibly a more elegant way to put it, but this works: ($ans_quantity !~ /^[0-9]$|^[0-9]{2}$|^[0-9]{3}$/) FNL
Dec 28, 2004 #3 rhymejerky Programmer Nov 30, 2004 23 US how about $ans_quantity =~ /^\d{1,3}$/ this matches 1 to 3 digit Upvote 0 Downvote
Dec 28, 2004 Thread starter #4 veteq Technical User Dec 7, 2004 23 CA that worked great, thank you for your quick reponses Veteq Upvote 0 Downvote