Possible duplicate:
Open RegEx tags, except standalone XHTML tags
Excerpt from the input file
<TD class="clsTDLabelWeb" width="28%">Municipality: </TD> <TD style="WIDTH: 394px" class="clsTDLabelSm" colSpan="5"> <span id="DInfo1_Municipality">JUPITER</span></TD>
My regex
(?<=<span id="DInfo1_Municipality">)([^</span>]*)
I have an HTML file saved on disk. I would like to use grep to search the file and display the contents of a certain range , although I do not know if this use of grep is correct. When I run grep in a file with an expression read from another file (so that I donβt get confused by avoiding any special characters), it does not output anything. I tested the expression in RegExr and it matches "JUPITER", which is exactly what I want to return. Thank you so much for your help!
Desired output
JUPITER
html bash regex grep screen-scraping
Cody jackson
source share