I would expect the same output of the following two commands, but the first one looks wrong to me:
% echo abc^ABC.123 | sed 's/[^A-z0-9]/_/g'
abc^ABC_123
% echo abc^ABC.123 | sed 's/[^[:alnum:]]/_/g'
abc_ABC_123By the way, gsed does the same. Am I missing something?..
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.