[ale] sed head scratcher

Jim Kinney jim.kinney at gmail.com
Tue Aug 4 15:15:18 EDT 2009


No regex in y/ explains why it subs over the entire line.

On Tue, Aug 4, 2009 at 3:05 PM, Pat Regan<thehead at patshead.com> wrote:
> 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
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
>
>



-- 
-- 
James P. Kinney III
Actively in pursuit of Life, Liberty and Happiness


More information about the Ale mailing list