Find / Replace Help

akia

Well-known member
Can someone help me with the find and replace regexs for correcting my site conversion:

I need to correct posts like this:

Code:
<blockquote class="ipsBlockquote" data-author="Matty" data-cid="3770" data-time="1359401115"> Welcome Jai, I'm sure I know you from somewhere! :p </blockquote>

So that they show as proper quote tags, it doesn't matter though if they have the person being quoted or link to the original post though if that makes it simpler.

Code:
<img src="http://i57.photobucket.com/albums/g226/star_twister/Egg_zps7fc1c4bd.png" alt="Egg_zps7fc1c4bd.png">

So that they show as attached image links

and

Code:
<a href="http://factualfacts.com/science-facts/ecstasy-could-be-a-cure-for-cancer/">http://factualfacts.com/science-facts/ecstasy-could-be-a-cure-for-cancer/</a>

to turn urls back into links
 
From? To? We can't help without more information.
from www.cgstudyo.com/forum. But i'm fixed problem. Ty so much your help this problem.. :)


When asking for help with a replacement you need to include a full example...meaning do not edit it at all from how it appears in your editor at your site (unless it contains a link to an adult content type site).

The example code you post you should be getting in this way...

  • Click edit on a post containing stuff you want to be replaced
  • copy the content of the bbcode and include it's surrounding tags and that is what you paste in a code block here

Here is an example of what to post when asking for replacement help...
____EXAMPLE________________________________________________
I need help replacing
from this:
Code:
[img width=550 height=429]http://xenforo.com/community/data/avatars/m/1/1321.jpg?1382353461[/img]

to this:
Code:
[IMG]http://xenforo.com/community/data/avatars/m/1/1321.jpg?1382353461[/IMG]
___________________________________________________________



To which I would be able to respond with something like:


Quick Find:
Code:
[img


Regular expression:
Code:
#(\[img)\swidth=[0-9]+\sheight=[0-9]+(])#siu

Replacement String:
Code:
\1\2



Doing things this way just makes it easier for everyone and for future reference there is a bunch of questions already asked and answered here so it might not be a bad idea to post your requests there

Thanks for help.. (y)
 
my urls are look like
Code:
<a href=\http://www.url.TLD?cid=99720460&mid=2228671964\ target=\_blank\ title=\Treasure Mile\><img src=\http://source.TLS/albums/etc/et%c/img_name.EXT\ border=\0\ alt=\Treasure Mile\ /></a>

and html tags for <table , <span width etc are with same \ not "
like
Code:
<span style=\font-family:Tahoma, Arial;\><span style=\font-size:11px;\>www.hertat.com/suositus/monigue81</span></span><span style=\font-family:Tahoma, Arial;\><span style=\font-size:11px;\>3x 100% 25 free spins</span></span><span style=\font-family:Tahoma, Arial;\><span style=\font-size:11px;\>only sweden, norway and finland</span></span>
how do i clean

Akia 's solution is best
Code:
UPDATE xf_post SET message = REPLACE(message, 'Â', ' ');
as the addon is timing out on my forum
how i wite Regular expression of above styles for this query
 
Last edited:
Top Bottom