C
Charles Law
Does anyone have a regex pattern to parse HTML from a stream?
I have a well structured file, where each line is of the form
<sometag someattribute='attr'>text</sometag>
for example
<SPAN CLASS='myclass'>A bit of text</SPAN>, or
Just some text, without tags
What I would like to be able to do is parse each line so that I get an array
like this
SPAN
CLASS
myclass
A bit of text
or
Just some text, without tags
The array bit should follow, but I don't profess to be a regex expert (or
any kind of expert for that matter). Can anyone help with a suitable
pattern?
TIA
Charles
I have a well structured file, where each line is of the form
<sometag someattribute='attr'>text</sometag>
for example
<SPAN CLASS='myclass'>A bit of text</SPAN>, or
Just some text, without tags
What I would like to be able to do is parse each line so that I get an array
like this
SPAN
CLASS
myclass
A bit of text
or
Just some text, without tags
The array bit should follow, but I don't profess to be a regex expert (or
any kind of expert for that matter). Can anyone help with a suitable
pattern?
TIA
Charles