in reply to Form validation
Note that this test is also rather picky...you may prefer to do the following which is both simpler and more useful IMO:use strict; use URI::Find; # Time passes sub test_uri { my $val = shift; my $copy = $val; my $found; find_uris($copy, sub { $found = shift; } ); return $val eq $found; }
If the text is even remotely acceptable, it will try to guess at something valid... :-)sub normalize_uri { my $found; find_uris($val, sub { $found = shift; } ); return $found; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Form validation
by Flavia (Initiate) on Nov 17, 2000 at 10:59 UTC |