if ($numexs=~/^\d+$/) {
    # do this if $numexs contains 1 or more numbers, nothing else
} else {

}

Your regex just checks to make sure there's one number in your entire
string. Anchor it at the beginning and the end, and then use a + to say
"one or more occurances of" ...
if ($numexs=~/^[0-9]+$/) { .....

\d is the same as [0-9]

On Thu, 2003-01-23 at 16:26, dan wrote:

> if ($numexs =~ /[0-9]/{
>     # do something
> }
> 
> which doesn't do what I want it to do, I want it to do more or less this:
> if ($numexs contains anything other than numbers) {
>     # do something
> }


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to