On Thursday 07 December 2006 21:31, Don Gould wrote: > See: http://www.regular-expressions.info/examples.html > > According to this I should be able to use regular expressions in > grep. > > I just don't quite understand what I'm doing wrong. You are not appreciating that grep selects _whole lines_ only according to the pattern you specify.
To select character items from the line you will need to use something more complicated. A very good demo of extracting data from the crud of a web page text is the 'telstracabletraffic' script Volker wrote. It's available from his web site. You also might be able to pipe the output from grep into either the 'cut' or the 'sed' utility to select the characters you want. The man page for sed is almost impenetrable, but, for example, the RUTE book has a fairly good explanation. -- CS
