Preg replace syntax - 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: Preg replace syntax (/showthread.php?tid=87614) Preg replace syntax by bramvandeperre on 12-05-2008 at 10:54 PM
Heya all! code: should become code: I wanted to do this using a preg replace, but I suck in writing patterns. Can anyone help? make sure that images are changed into hyperlinks... if there's no alt, the filename should be the text (so not only preg_replace but also some if/else thingies thanks in advance Bram oh almost forgot: it's PHP... RE: Preg replace syntax by Ezra on 12-05-2008 at 11:31 PM
Little regex without the alt thingy you wanted, i'm sure you or someone else can make that work for you code:Replacement string: code: RE: RE: Preg replace syntax by bramvandeperre on 12-05-2008 at 11:40 PM
quote: thanks alot, but what if there is no alt at all? then the filename should be there (like image001.jpg or so) |