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

Results 1 to 5 of 5
  1.     
    #1
    ψ(`∇?)ψ

    Default Need regex search expression

    I f*cked up few hundreds post in my blog, with search and replace, and now I have dupe terms, which I can't replace with simple search, I need to use regex search and replace to find exact matches.

    If anyone could help me, I need this text:

    Code: 
    [/stextbox]
    <strong>
    as a search regex
    cvrle77 Reviewed by cvrle77 on . Need regex search expression I f*cked up few hundreds post in my blog, with search and replace, and now I have dupe terms, which I can't replace with simple search, I need to use regex search and replace to find exact matches. If anyone could help me, I need this text: <strong> as a search regex Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    preg_replace("~\[/stextbox\]\s<strong>~","",$post)

  4.     
    #3
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    If there is new line then regex will be:

    PHP Code: 
    \[\/stextbox\]\n\<strong\> 
    Php:
    PHP Code: 
    preg_replace('/\[\/stextbox\]\n\<strong\>/i, "", $mystring); 

  5.     
    #4
    ψ(`∇?)ψ
    Wooohooo, thanks man, actually, for what I've used, your full line didn't worked, even though, If I understood correctly the manual from that plugin, it should. However, with 20 seconds of experimenting, I got this:

    (\[/stextbox\]\s<strong>)
    and it worked
    Now I figured, hope so, how it works
    Thanks again

    EDIT: funny, both \n and \s are giving me the same results... :/


    Thanks both, will experiment before applying

  6.     
    #5
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    \n is for matching a Line Feed and \s is for whitespace

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help with RegEx
    By dima1236 in forum Web Development Area
    Replies: 7
    Last Post: 14th Jan 2012, 05:53 PM
  2. How to remove CSS Expression?
    By Rox in forum Web Development Area
    Replies: 21
    Last Post: 6th Jan 2012, 03:58 PM
  3. Php Regular Expression ?
    By warezrock in forum Web Development Area
    Replies: 1
    Last Post: 6th Jul 2011, 03:56 PM
  4. Help with Regex
    By ChaoscripT in forum Web Development Area
    Replies: 2
    Last Post: 15th Dec 2010, 09:26 PM
  5. [Selling] Expression XenForo Theme - $20.00 - SleekVb.Net
    By GCSkye in forum Completed Transactions
    Replies: 0
    Last Post: 12th Nov 2010, 02:25 AM

Tags for this Thread

BE SOCIAL