Activity Stream
48,167 MEMBERS
6762 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 3 of 3
  1.     
    #1
    Member

    Default Lulzimg preg_replace help

    Can anyone make me a preg_replace to convert lulzimages from this:

    http://lulzimg.com/i04/452b0o.jpg

    to this current one:

    http://i04.lulzimg.com/i/452b0o.jpg

    I suck at regex
    masterb56 Reviewed by masterb56 on . Lulzimg preg_replace help Can anyone make me a preg_replace to convert lulzimages from this: http://lulzimg.com/i04/452b0o.jpg to this current one: http://i04.lulzimg.com/i/452b0o.jpg I suck at regex :facepalm: Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Retired NinJa
    Website's:
    loledhard.com
    PHP Code: 
    echo preg_replace('/http:\/\/lulzimg.com\/(.*?)\/(.*?)\n/','http://$1.lulzimg.com/i/$2',$string."\n"); 
    ^ see if it works out good



    You don't hate Justin bieber.You hate the fact you ain't Justin Bieber!

  4.     
    #3
    Member
    Wow man that was fast! Haha I was butting my head trying to figure out that one with just doing long preg_match codes lolz. Thanks! Rep+++

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Preg_replace help
    By Gavo in forum Web Development Area
    Replies: 3
    Last Post: 25th Sep 2012, 07:23 PM
  2. Replace with Dynamic variable in preg_replace
    By MarPlo in forum Web Development Area
    Replies: 2
    Last Post: 21st Feb 2012, 08:36 AM
  3. Wordpress title preg_replace
    By energyboost in forum Wordpress
    Replies: 2
    Last Post: 3rd Oct 2011, 11:47 PM
  4. lulzimg
    By ciaociao4 in forum Web Development Area
    Replies: 5
    Last Post: 17th Aug 2011, 07:55 AM
  5. preg_replace first half of matches ?
    By Porsche_maniak in forum Web Development Area
    Replies: 1
    Last Post: 16th Jan 2011, 05:12 PM

Tags for this Thread

BE SOCIAL