note 25789 added to function.preg-match
| From: | Fraghunter at web dot de | Date: | Sun, 06 Oct 2002 11:48:01 +0000 |
| Subject: | note 25789 added to function.preg-match | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-37715@lists.php.net to get a copy of this message | ||
Yes, carl you are right.
parse_url() does parse urls like any programm would do.
It is just the right way, because without a protocoll "foo.com/hello.html" IS a path -
else it would not be possible to give a folder the name "foo.com".
So if you have a formular were you want users who are inexperienced with the internet to enter an
URL then this regexps would prove useful.
You could parse the string given, replace the missing components with the right ones and then paste
it together again.
--
http://www.php.net/manual/en/function.preg-match.php
http://master.php.net/manage/user-notes.php?action=edit+25789
http://master.php.net/manage/user-notes.php?action=delete+25789
http://master.php.net/manage/user-notes.php?action=reject+25789