[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Egrep Version 2.3
From: |
address@hidden |
Subject: |
Egrep Version 2.3 |
Date: |
Wed, 27 Jun 2001 07:34:12 -0400 |
egrep -i -e -f test.txt test1.htm matches, but for test2.htm does not (line
break before closing '>')
(My first hairy regular expression!)
I was trying to do "A String within doublequotes" (Mastering Regular
Expressions, O'Reilley 7th Printing, page 22); instead of quotes we have the
brackets of an html tag. Reading the expression from left to right,
<[a-z][a-z0-9]* the html tag identifier
[^>]*onload *= * followed by the onload attribute
(before the closing
bracket)
[^> ]* skip over the attribute's value (presuming
spaces are delimiting)
\( an open parenthesis
([^>]*> a close bracket (as long as it's not nested)
I was trying to see if Regular expressions could do syntax parsing without
becoming a mile long.
For hairy parsing like this do you recommend YACC? Or does sed have
extensions to handle it??
test.txt
Description: Text document
- Egrep Version 2.3,
address@hidden <=