[geeks] Quick sed question

alex j avriette avriettea at speakeasy.net
Sat Jun 22 10:49:23 CDT 2002


>> 	sed -e 's/^[ 	]*//'
>
> Or more efficiently :
>
> sed -e 's/^[     ]+//'

well sure its a little more efficient, but its not the same expression.

z+

that is one or more z's

z*

that is zero or more z's

z+?

that is zero or one occurrence of one or more z's. which mostly matches 
the original expression.

alex



More information about the geeks mailing list