It does, but if it can't find a match, it will backtrack.
David Berube
Berube Consulting
[EMAIL PROTECTED]
(603)-485-9622
http://www.berubeconsulting.com/
Michael ODonnell wrote:
Hmmmm. I'd heard that sed's RE parser is a type known as
"greedy" meaning that every expression matches the longest
possible string in the input. I therefore can't understand
how after all the leading whitespace has been matched there
can be any whitespace "left over" to match the not-a-hashmark
expression, but apparently there is. Anyway, changing that part
to be not-a-hashmark-or-whitespace seems to solve the problem:
sed -r -e
'/^[[:space:]]*[^#[:space:]].*[[:space:]]+xyz[[:space:]]*/{s/^.*$/REWRITTEN/}'
My thanks to all for the feedback.
_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
_______________________________________________
gnhlug-org mailing list
gnhlug-org@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-org