>
> I have a script that is used for text messaging. I added a
> line of code to check to make sure that input is in a field
> before the message is sent. My code is as follows:
>
> if($b !~ m/^\w[\w\s]*\w$/) { $error .= "Enter a message <br> \n"; }
>
> This fails if the field has any punctuation characters. I
> have checked on www.perldoc.com but I seem to be going in the
> wrong direction. I only want it to check to make sure there
> is data in the field. I am not concerned with what the data
> is. This is only to keep people from sending blank messages.
Why din't you say so! Istead of a regex just do this
if(!$b) { $error .= ...
That says if $b does not contain anything
if($b) {
Says if $b contains anything
> My thought is that it's one of these, but I am not sure. \w,
> \W, \s, \S, \d,
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]