From the html source file i've to identify tag with inline style attribute using java.
For example
<span id="abc"
style="font-size:11.0pt;font-family:'arial black','sans-serif'; color:#5f497a">
Please help
From the html source file i've to identify tag with inline style attribute using java.
For example
<span id="abc"
style="font-size:11.0pt;font-family:'arial black','sans-serif'; color:#5f497a">
Please help
Using a regex is one way to do it, eg.
/<span[^>]*style=.*?>/
Or alternatively, if the HTML is well formed, load it using a parser and then use an XPath.
//span[@style]
http://www.codinghorror.com/blog/2009/11/parsing-html-the-cthulhu-way.html
Do not parse HTML with regex. Use a proper HTML parser (there are tons out there for Java), and extract the desired data from the DOM tree.