Offlist Re: mcedit bug

murban murban at cs.uni-magdeburg.de
Thu Dec 13 21:52:22 UTC 2001


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



More information about the mc-devel mailing list