|
From: | Paolo Bonzini |
Subject: | Re: [4/11] Native MSVC support (file-magic-glob) |
Date: | Fri, 13 Jul 2007 14:50:49 +0200 |
User-agent: | Thunderbird 2.0.0.4 (Macintosh/20070604) |
[lL][iI][bB][nN][aA][mM][eE] by using this sed expr s/[aA]/[aA]/g;s/[bB]/[bB]/g;<22 more>;s/[yY]/[yY]/g;s/[zZ]/[zZ]/g;Isn't there a better way? (I can't think of one offhand, given how this is used to generate a list of "potential_libs", but still...this can't be very efficient.)
I would do something like this: s/[A-Za-z]/*|&|ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ*/g s/\*|\(.\)|[A-Za-z]*\1[A-Za-z]\{25\}\([A-Za-z]\)[A-Za-z]*\*/[\1\2]/g or, for GNU sed 4.x only, s/[A-Za-z]/[\l&\u&]/g Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |