Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

BBS: Re: perl question, re characters - September 12, 1998 at 09:16:34

You are here: irt.org | BBS | Re: perl question, re characters [This BBS is closed]

Posted by Jason Turner on September 12, 1998 at 09:16:34:

In Reply to: perl question, re characters posted by Osvaldo on September 12, 1998 at 02:49:35:


: How do I do this;

: $value = " (blank)" if ( ($name = "something") && ($value contaings anything but a-z A-Z or 0-9));

: Is it like this?
: $value = "" if ( ($name eq "something") and ($value !~ /a-z,A-Z,0-9/));

$value = "" if ( ($name eq "something") and ($value =~ /[!a-zA-Z0-9]/));

And, if you allow underscores

$value = "" if ( ($name eq "something") and ($value =~ /\W/));

I think that's what you're asking :)
Follow-ups:

You are here: irt.org | BBS | Re: perl question, re characters [This BBS is closed]

©2018 Martin Webb