Re: Offlist Re: mcedit bug



Hi Bjoern,

>  I don't know much about sed but
> 
>   sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'
> 
>  works for english text. I'm not sure why not y/[a-z]/[A-Z]/ works.

It doesn't work because `y/source/dest/' doesn't take patterns. `source'
and `dest' neither are patterns nor regular expressions, it simply are
pools of characters. The search pattern is ".*" by default. The
characters that appear both in the matched input and in `source' are
transliterated to the corresponding characters in `dest'.
`y/[a-z]/[A-Z]/' would change all a`s into A's and all z`s into Z`s, but
nothing else. It's a strange command; I really can't imagine much
rational use cases for it.

Matthias



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]