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

Results 1 to 8 of 8
  1.     
    #1
    Member
    Website's:
    maxneeds.info

    Default Preg Replace question

    I want to replace all
    [img=URL]
    with
    <img src=URL>

    Preg_replace should do it but i am not familiar how.
    Any suggestions?

    New question :
    Hi there !
    Because i didn't wanted to make a new post i will just edit this one.

    How do i 'preg_match' starting from '=' and ending to '&'

    example :: http://bkabkabk.com/index.php?file=aadasd.jpg&options
    Porsche_maniak Reviewed by Porsche_maniak on . Preg Replace question I want to replace all with <img src=URL> Preg_replace should do it but i am not familiar how. Any suggestions? New question : Hi there ! Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Retired NinJa
    Website's:
    loledhard.com
    str_replace(search, replace, String) would work fine for this.



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

  4.     
    #3
    Member
    Website's:
    maxneeds.info
    It won't because how would you replace ']' with '>' as there are other tags finishing with ']' (for example [b]) in the same page..

  5.     
    #4
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    preg_replace('~\[img=(.*?)\]~is','<img src="$1">',$html) should work fine
    Code: 
    http://regexr .com?2rq16

  6.     
    #5
    Member
    Website's:
    maxneeds.info
    t3od0r - worked nicely.
    Btw great site i will use it

  7.     
    #6
    Member
    You can convert full bbcode to html with this, maybe worth it for any more find/replace

    http://elouai.com/bb2html.php.txt

  8.     
    #7
    Member
    Website's:
    maxneeds.info
    bump .

  9.     
    #8
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    for the new question: =(.*)&

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Preg and Sql
    By Chris2k in forum Web Development Area
    Replies: 6
    Last Post: 28th Apr 2012, 02:19 PM
  2. Which is the best replace tools
    By tcnnvnn in forum Webmaster Discussion
    Replies: 5
    Last Post: 29th Sep 2011, 09:40 AM
  3. how to replace word in vb4
    By m107 in forum vBulletin
    Replies: 13
    Last Post: 4th Sep 2010, 09:20 AM
  4. Preg replace help
    By SJshah in forum Web Development Area
    Replies: 17
    Last Post: 8th Aug 2010, 10:47 PM
  5. how to replace bad words?
    By wman in forum vBulletin
    Replies: 2
    Last Post: 19th Feb 2009, 12:18 PM

Tags for this Thread

BE SOCIAL