php, preg replace help - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: php, preg replace help (/showthread.php?tid=52138) php, preg replace help by Ezra on 10-23-2005 at 11:17 PM
I'm making a bookmarks feature for my website, and I got the cookie system and all already working, but when users forget to put a http:// before the link, it will point to my server and make the link useless. RE: php, preg replace help by KeyStorm on 10-23-2005 at 11:23 PM You better use substrings for that... tbh RE: php, preg replace help by Ezra on 10-23-2005 at 11:24 PM substrings? I'm sorry i'm a php n00b RE: php, preg replace help by Stigmata on 10-23-2005 at 11:24 PM
psuedo.. code: thats how i would do it... in php thats something like.. code: RE: php, preg replace help by Ezra on 10-23-2005 at 11:32 PM
Ah, thanks a bunch RE: php, preg replace help by brian on 10-24-2005 at 01:10 AM If you www.pastebin.com'd it.. we could help. RE: php, preg replace help by Ezra on 10-24-2005 at 12:47 PM
nah, already found it, I made a function and used a return but that caused the rest of the function to stop executing, so I changed it a little RE: php, preg replace help by Stigmata on 10-24-2005 at 01:05 PM
RE: php, preg replace help by J-Thread on 10-24-2005 at 01:24 PM
What if I enter this link: code:Should be something like that I think... RE: php, preg replace help by Ezra on 10-24-2005 at 02:28 PM
I guess that will also allow me to use other protocols like ftp, thats good RE: php, preg replace help by WDZ on 10-24-2005 at 02:32 PM
quote:http://php.net/reference.pcre.pattern.syntax It will match any string that begins with 1 or more letters followed by a colon and 2 slashes. It's also case-insensitive. RE: php, preg replace help by J-Thread on 10-24-2005 at 03:00 PM
Exactly RE: php, preg replace help by Ezra on 10-24-2005 at 03:27 PM Thanks for the explanation both |