note 54735 added to function.preg-replace
| From: | webdesign at cerebella dot com | Date: | Thu, 14 Jul 2005 03:29:22 +0000 |
| Subject: | note 54735 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-91928@lists.php.net to get a copy of this message | ||
chick in distress.any php guru that would help me figure out why this statement doesnt work?
$subfolders = preg_replace("#https?://[^/]+(/?.*)#", "\$1", $sdurl);
trying to get rid of the root url, ex: http://localhost
// leaving only the subfolders, ex: /mambo/
any ideas?
still does see the root url so i get duplicates.:(((
----
Manual Page -- http://www.php.net/manual/en/function.preg-replace.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54735
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54735&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54735&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54735&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54735&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54735&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54735&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54735&report=yes
Search -- http://master.php.net/manage/user-notes.php