Page 1 of 1
urltext remove tag attributes
Posted: Fri Aug 13, 2010 1:12 pm
by roboto
How to get just a text from a tag?
Example:
<td class="sample text">
<a href="foo.html">sample text</a>
urltext remove tag attributes
Posted: Fri Aug 13, 2010 1:56 pm
by mark
Not entirely clear on what you want. If you want to extract text from HTML try
<$Html='
<td class="sample text">
<a href="foo.html">sample text</a>
'>
<fetch "
http://localhost/index.html" $Html>
<urlinfo text>
<$Text=$ret>
If you're looking to extract something from a snippet you might use:
<rex ">><a =[^>]+>\P=!</a>+\F</a>" $Html>
<$Text=$ret>