[ale] sed head scratcher

Pat Regan thehead at patshead.com
Tue Aug 4 15:05:05 EDT 2009


Jim Kinney wrote:
> [jkinney at worktop tmp]$ cat testfile | sed -r '/[A-Z]{8}[0-9]{1,3}/
> y/[QWERTYUIOPASDFGHJKLZXCVBNM]{8}[0-9]{1,3}/[qwertyuiopasdfghjklzxcvbnm]{8}[0-9]{1,3}/'
> abcdefgi01
> bcdefghi02
> abcdfghi01 little stuff
> 123 bsgxaaki01 456
> 123.0.23.45 abcdefgi02 fredspage
> 
> It LC's all text yet it looks like the search field requires 1-3
> digits. So the string "FredsPage" should not be altered.
> 

y/// is for transliterating, it shouldn't be able to take a regex.

Pat

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
Url : http://mail.ale.org/pipermail/ale/attachments/20090804/ce403ba6/attachment.bin 


More information about the Ale mailing list