Re: [CentOS] regex question

2011-06-07 Thread Joseph L. Casale
>Dunno but Google 'sed only first match' gives some answers... I resorted to just using a perl one liner. It wasn't as straight forward as that. Using sed's {p;q;} syntax with the pattern provides the functionality, but it was the capture group only I was interested, and not the whole line whic

Re: [CentOS] regex question

2011-06-07 Thread John Doe
From: Joseph L. Casale > I am trying to extract a pattern from a downloaded html file. I only want the > first match Dunno but Google 'sed only first match' gives some answers... JD ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/ma

Re: [CentOS] regex question

2011-06-06 Thread m . roth
Joseph L. Casale wrote: > Hey guys, > I am trying to extract a pattern from a downloaded html file. I only want > the first match > printed, problem is I don't know how to force sed to exit after printing > the first match of > a capture group. Anyone know the trick to manipulating {p;q;} to print

[CentOS] regex question

2011-06-06 Thread Joseph L. Casale
Hey guys, I am trying to extract a pattern from a downloaded html file. I only want the first match printed, problem is I don't know how to force sed to exit after printing the first match of a capture group. Anyone know the trick to manipulating {p;q;} to print a capture group? Thanks, jlc ___