On 2/4/02 8:47 PM, Stuart Clark <[EMAIL PROTECTED]> wrote: > How do I replace the letter M with 20 spaces. > > s/M/\s[20]/; # dosen't seem to work :-( > > Regards > Stuart Clark
This should work: s/M/' ' x 20/e; Remember that unless you use the 'i' (case-Insensitivity) option on the regex, you'll only replace upper-case Ms, and unless you use 'g' (Global replace), you'll only replace the first M. Hope that helps, -- Michael Kelly [EMAIL PROTECTED] http://www.jedimike.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]