Hack:   Global Search and Replace with Perl
Subject:   (\s+)? versus (\s)*
Date:   2003-12-15 20:51:04
From:   anonymous2
Response to: (\s+)? versus (\s)*

the obvious difference is in the results ...

perl -pi -e 's/^(\s+)?(telnet|shell|login|exec)/# $2/' /etc/inetd.conf

will remove any leading whitespace before "telnet" or "shell" or ...


perl -pi -e 's/^(\s)*(telnet|shell|login|exec)/# $2/' /etc/inetd.conf

Would presumably replace the line with the second whitespace charecter, if there was one...