Help invoking a regexp
| From: | Nicklas af Ekenstam | Date: | Thu, 25 Jul 2002 23:54:25 +0000 |
| Subject: | Help invoking a regexp | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-109625@lists.php.net to get a copy of this message | ||
Hi
I have this regular expression:
(((http|https|ftp|gopher)|mailto):(//)?[^ <>"\t]*|www\.[-a-z0-9.]+)[^
.,;\t<">\):]
Which is supposed to match hyperlinks. I would like to use this
from php to grab all hyperlinks in a text file and return them
in an array.
I've messed around with the function preg_match_all() but I just
can't seem to get it to work. Any suggestions would be very
appreciated.
Thanks,
Nicklas