• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

sql statement to remove custom bbcode

Nasr

Well-known member
#1
I need help removing custom BBcode with an sql statement from all of my posts.

my bbcode looks like this

[ALIGN=CENTER][TABLETEXT="width:80%;background-color:crimson;border:8px solid burlywood;"][CELL="filter:;"][ALIGN=center]
[ALIGN=CENTER][TABLETEXT="width:70%;background-color:black;"][CELL="filter:;"][ALIGN=center]

What I want to do is remove the opening bracket everything between it that has english letters and remove closing brackets.

basically, anything that's english or numbers or any signs between [ and ] should be removed.
 

EQnoble

Well-known member
#4
I would like to see a few full examples of these table codes from your site, I can't possibly write you a regular expression without knowing everything that needs to be caught and possibly avoided.

can you copy and paste a bunch of examples separated by line breaks
Code:
into
 
a
 
code
 
box?
 

Nasr

Well-known member
#5
Code:
[ALIGN=CENTER][TABLETEXT="width:80%;background-color:crimson;border:8px solid burlywood;"][CELL="filter:;"][ALIGN=center]
[ALIGN=CENTER][TABLETEXT="width:70%;background-color:black;"][CELL="filter:;"][ALIGN=center]
[/ALIGN][/CELL][/TABLETEXT][/ALIGN]
[/ALIGN][/CELL][/TABLETEXT][/ALIGN]
 
[ALIGN=CENTER][TABLETEXT="width:70%;background-color:black;"][CELL="filter:;"] [URL='http://banibkr.com/showthread.php?p=286875#post286875'][IMG]http://banibkr.com/net1.com.sa/red/buttons/viewpost.gif[/IMG][/URL]
[I][ALIGN=CENTER][TABLETEXT="width:60%;background-image:url('http://banibkr.com//backgrounds/22.gif');"][CELL="filter:;"][FONT=Arial][SIZE=5][COLOR=red][ALIGN=center]
[/ALIGN][/COLOR][/FONT][/CELL][/TABLETEXT][/ALIGN]
 
 
[poem=font=",6,black,normal,normal" bkcolor="transparent" bkimage="" border="none,4," type=0 line=0 align=center use=ex num="0,black""]
[/poem]
 
[poem=font=",6,blue,normal,normal" bkcolor="transparent" bkimage="" border="none,4," type=0 line=0 align=center use=ex num="0,black""]
 
[/poem]
These are a few. There are some others. What I was hoping to do is clear everything that's between the brackets.
 

EQnoble

Well-known member
#6
so you want
Code:
[to remove anything here including the brackets]
and keep anything here 
[/and remove anything here]
?

And you want to strip everything off of which tags...I need an exact list of tags