Please help me to understand the ereg!

Discussion in 'PHP' started by ziya, Sep 22, 2007.

  1. #1
    $message = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:]\\1' . str_replace(' ', '%20', '\\3') . '[/img:]'", $message);


    Please help me to understand the script

    Thank upi in advance
     
    ziya, Sep 22, 2007 IP
  2. omgitsfletch

    omgitsfletch Well-Known Member

    Messages:
    1,222
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    145
    #2
    Seems to search for any links to an image file, and convert the link into BBCODE with tags.
     
    omgitsfletch, Sep 22, 2007 IP