Hi,
I don't suppose anyone has any ideas why this regex isn't working?
Sample HTML:
<span
lang=EN-GB style='font-size:7.5pt;font-family:Verdana;color:#CCFFFF'>raYIbZlPS
Visit coursework ge in ge fo ge for ge more paper ge Do ge not ge redistribute
raYIbZlPS</span>
Code:
Its really annoying me. Basically, the format can look anything like;
lang=EN-GB style='font-size:7.5pt;font-family:Verdana;color:#CCFFFF'>cocf cfr
secfcfw orcf cfk incf focf cf!</span>
<span
lang=EN-GB style='font-size:7.5pt;font-family:Verdana;color:#CCFFFF'>cocd cdr
secdcdw </span>
<span lang=EN-GB style='font-size:7.5pt;font-family:
Verdana;color:#FFCCFF'>VgODf6j4 from VgODf6j4 coursewrok VgODf6j4 work VgODf6j4
info VgODf6j4 </span>
<span lang=EN-GB
style='font-size:7.5pt;font-family:Verdana;color:#CCFFFF'>11u2737Yu Visit
coursework gd in gd fo gd for gd more paper gd Do gd not gd redistribute
11u2737Yu</span>
<span
lang=EN-GB style='font-size:7.5pt;font-family:Verdana;color:#CCFFFF'>cogb gbr
segbgbw orgb gbk ingb fogb gb;</span>
Note how the newlines are different on each of them. I have a feeling this is whats causing the problem :(
The idea behind this code, is to remove all tags that look like;
lang=EN-GB style='font-size:7.5pt;font-family:Verdana;color:#CCFFFF'>CONTENT</span>
..and;
lang=EN-GB style='font-size:7.5pt;font-family:Verdana;color:#FFCCFF'>CONTENT</span>
Anyone got any suggestions?
TIA
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
I don't suppose anyone has any ideas why this regex isn't working?
Sample HTML:
<span
lang=EN-GB style='font-size:7.5pt;font-family:Verdana;color:#CCFFFF'>raYIbZlPS
Visit coursework ge in ge fo ge for ge more paper ge Do ge not ge redistribute
raYIbZlPS</span>
Code:
Code:
$desc =~ s|\Q<span\E[\n\s+]\Qlang=EN-GB\E[\n\s+]\Qstyle='font-size:\E[\n\s+]\Q7.5pt;font-family:Verdana;\E[\n\s+]\Qcolor:#CCFFFF'>\E([\W\w\d\s\n]+?)\Q</span>\E||ig;Its really annoying me. Basically, the format can look anything like;
Quote:
<span lang=EN-GB style='font-size:7.5pt;font-family:Verdana;color:#CCFFFF'>cocf cfr
secfcfw orcf cfk incf focf cf!</span>
<span
lang=EN-GB style='font-size:7.5pt;font-family:Verdana;color:#CCFFFF'>cocd cdr
secdcdw </span>
<span lang=EN-GB style='font-size:7.5pt;font-family:
Verdana;color:#FFCCFF'>VgODf6j4 from VgODf6j4 coursewrok VgODf6j4 work VgODf6j4
info VgODf6j4 </span>
<span lang=EN-GB
style='font-size:7.5pt;font-family:Verdana;color:#CCFFFF'>11u2737Yu Visit
coursework gd in gd fo gd for gd more paper gd Do gd not gd redistribute
11u2737Yu</span>
<span
lang=EN-GB style='font-size:7.5pt;font-family:Verdana;color:#CCFFFF'>cogb gbr
segbgbw orgb gbk ingb fogb gb;</span>
Note how the newlines are different on each of them. I have a feeling this is whats causing the problem :(
The idea behind this code, is to remove all tags that look like;
Code:
<span lang=EN-GB style='font-size:7.5pt;font-family:Verdana;color:#CCFFFF'>CONTENT</span>
..and;
Code:
<span lang=EN-GB style='font-size:7.5pt;font-family:Verdana;color:#FFCCFF'>CONTENT</span>
Anyone got any suggestions?

TIA
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!