li...@sbt.net.au wrote:
that works well, the other item I need to grab is 'Duration', which can be
2 or 3 digits as below;
is there a way to have egrep get such 2 or 3 digits ?
<tr><td colspan="1" rowspan="1">Duration: </td><td colspan="1"
rowspan="1">60</td></tr>
or
...<td colspan="1" rowspan="1">120</td>...
Use the ? operator, which means that a match is optional, i.e.
egrep -i 'duration' | egrep -o '>[0-9][0-9][0-9]?<'
cheers
rickw
--
------------------------------------
Rick Welykochy || Vitendo Consulting
Gerrold's Fundamental Truth:
It's a good thing money can't buy happiness.
We couldn't stand the commercials.
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html