on 3/17/02 5:43 AM, [EMAIL PROTECTED] at
[EMAIL PROTECTED] wrote:
> What's this do? How would we use Perl in our scripts? Can anyone give an
> example of when this feature would be handy?
Yes, one very important example is email verification:
Previously it was not so easy to do this in MC, presumably, now it will
accept these PERL expressions, my current email verifier was given by
someone else and required much more code and was still incomplete...
allowing some invalid email addresses to get through.:
## From the "famed" formMail.pl
sub check_email {
# If the e-mail address contains: #
if ($email =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ ||
# the e-mail address contains an invalid syntax. Or, if the
# syntax does not match the following regular expression pattern
# it fails basic syntax verification. #
$email !~
/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/) {
And this important plug:
# If they try to include server side includes, erase them, so they
# aren't a security risk if the html gets returned. Another
# security hole plugged up.
$value =~ s/<!--(.|\n)*-->//g;
Haven't tested yet...
Hinduism Today
Sivakatirswami (an ant in a world of regex elephants)
Editor's Assistant/Production Manager
_______________________________________________
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard