Re: shell script to parse html and date comp ?

Rick Welykochy <[email protected]>
Newsgroups gmane.org.user-groups.slug.general
Message-ID <[email protected]>
[email protected] 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.