Support Forum

More bb regex

AG Alex Greenland
Alex Greenland
Member

Guys

 

Another one to consider adding

 

'/[COLOR=(.*?)](.*?)[/COLOR]/is'

'<span style=”color: 1″>2</span>'

 

Cheers

 

Alex

6 Answers

New Answer

AG Alex Greenland
Alex Greenland
Member

Ok having a blonde monent, The above regex on 

[color=#0000ff]Blue Text[/color]

 

produces

 

<span style=”color: #0000ff”>Blue Text</span>

 

any clues as to why its escaping the double quote?

alex

MP Mr Papa
Mr Papa
Member

are you sure its the output of the regex generating the slashing? I dont really see any problem with the regex…

could you be adding the slashes prior to saving the data in the db?

AG Alex Greenland
Alex Greenland
Member

I am 99% sure but could be wrong !

I am var dumping the data just after the regex and it has the escaped quotes

Getting a little late here in Blightey so will have another check tomorrow

 

Alex

MP Mr Papa
Mr Papa
Member

okay, please let us know. I will try to play around if I get some time too…

AG Alex Greenland
Alex Greenland
Member

Well the 1% is always the bit that bites !!!

 

The slashes were being added before the regex ran 

 

Alex

MP Mr Papa
Mr Papa
Member

Wink glad you resolved.  have ticket open to add this to next version.