Skip to main content
added 1199 characters in body
Source Link

Ruby, 70 6767 74 bytes

f=->s{puts s;(?b..?{z).each{|c|puts s if s=~/\S/;s|c|s.gsub! /[^#{c}-{]z]/i,' '';puts s if s=~/\S/}}

Thanks to @TuukkaX for pointing out some parens could be dropped (-3 bytes)

Unfortunately I then had to add 7 bytes because original version failed to handle "z".

f.call('Hello''The quick brown fox jumps over the lazy dog!')
 
HelloThe quick brown fox jumps over the lazy dog!
HelloThe quick brown fox jumps over the l zy dog
HelloThe quick  rown fox jumps over the l zy dog
HelloThe qui k  rown fox jumps over the l zy dog
HelloThe qui k  rown fox jumps over the l zy  og
HTh llo qui k  rown fox jumps ov r th  l zy  og
HTh llo qui k  rown  ox jumps ov r th  l zy  og
HTh llo qui k  rown  ox jumps ov r th  l zy  o
T  llo qui k  rown  ox jumps ov r t   l zy  o
T  llo qu  k  rown  ox jumps ov r t   l zy  o
T  llo qu  k  rown  ox  umps ov r t   l zy  o
T  llo qu     rown  ox  umps ov r t   l zy  o
T   qu     rown  ox  umps ov r t     zy  o
T   qu     rown  ox  u ps ov r t     zy  o
T   qu     row   ox  u ps ov r t     zy  o
T   qu     r w    x  u ps  v r t     zy
T   qu     r w    x  u  s  v r t     zy
T    u     r w    x  u  s  v r t     zy
T    u       w    x  u  s  v   t     zy
T    u       w    x  u     v   t     zy
     u       w    x  u     v         zy
             w    x        v         zy
             w    x                  zy
                  x                  zy
                                     zy
                                     z

Ruby, 70 67 bytes

f=->s{(?b..?{).each{|c|puts s if s=~/\S/;s.gsub! /[^#{c}-{]/i,' '}}

Thanks to @TuukkaX for pointing out some parens could be dropped (-3 bytes)

f.call('Hello')
 
Hello
Hello
Hello
Hello
Hello
H llo
H llo
H llo
  llo
  llo
  llo
  llo
    o
    o
    o

Ruby, 70 67 74 bytes

f=->s{puts s;(?b..?z).each{|c|s.gsub! /[^#{c}-z]/i,' ';puts s if s=~/\S/}}

Thanks to @TuukkaX for pointing out some parens could be dropped (-3 bytes)

Unfortunately I then had to add 7 bytes because original version failed to handle "z".

f.call('The quick brown fox jumps over the lazy dog!')
The quick brown fox jumps over the lazy dog!
The quick brown fox jumps over the l zy dog
The quick  rown fox jumps over the l zy dog
The qui k  rown fox jumps over the l zy dog
The qui k  rown fox jumps over the l zy  og
Th  qui k  rown fox jumps ov r th  l zy  og
Th  qui k  rown  ox jumps ov r th  l zy  og
Th  qui k  rown  ox jumps ov r th  l zy  o
T   qui k  rown  ox jumps ov r t   l zy  o
T   qu  k  rown  ox jumps ov r t   l zy  o
T   qu  k  rown  ox  umps ov r t   l zy  o
T   qu     rown  ox  umps ov r t   l zy  o
T   qu     rown  ox  umps ov r t     zy  o
T   qu     rown  ox  u ps ov r t     zy  o
T   qu     row   ox  u ps ov r t     zy  o
T   qu     r w    x  u ps  v r t     zy
T   qu     r w    x  u  s  v r t     zy
T    u     r w    x  u  s  v r t     zy
T    u       w    x  u  s  v   t     zy
T    u       w    x  u     v   t     zy
     u       w    x  u     v         zy
             w    x        v         zy
             w    x                  zy
                  x                  zy
                                     zy
                                     z
edited body
Source Link

Ruby, 70 67 bytes

f=->s{(?b..?y{).each{|c|puts s if s=~/\S/;s.gsub! /[^#{c}-y]{]/i,' '}}

Thanks to @TuukkaX for pointing out some parens could be dropped (-3 bytes)

Calling it:

f.call('Hello')

Hello
Hello
Hello
Hello
Hello
H llo
H llo
H llo
  llo
  llo
  llo
  llo
    o
    o
    o

Ruby, 70 67 bytes

f=->s{(?b..?y).each{|c|puts s if s=~/\S/;s.gsub! /[^#{c}-y]/i,' '}}

Thanks to @TuukkaX for pointing out some parens could be dropped (-3 bytes)

Calling it:

f.call('Hello')

Hello
Hello
Hello
Hello
Hello
H llo
H llo
H llo
  llo
  llo
  llo
  llo
    o
    o
    o

Ruby, 70 67 bytes

f=->s{(?b..?{).each{|c|puts s if s=~/\S/;s.gsub! /[^#{c}-{]/i,' '}}

Thanks to @TuukkaX for pointing out some parens could be dropped (-3 bytes)

Calling it:

f.call('Hello')

Hello
Hello
Hello
Hello
Hello
H llo
H llo
H llo
  llo
  llo
  llo
  llo
    o
    o
    o
added 75 characters in body
Source Link

Ruby, 7070 67 bytes

f=->(s)>s{(?b..?y).each{|c|puts s if s=~/\S/;s.gsub!( /[^#{c}-y]/i,' ')}}

Thanks to @TuukkaX for pointing out some parens could be dropped (-3 bytes)

Calling it:

f.call('Hello')

Hello
Hello
Hello
Hello
Hello
H llo
H llo
H llo
  llo
  llo
  llo
  llo
    o
    o
    o

Ruby, 70 bytes

f=->(s){(?b..?y).each{|c|puts s if s=~/\S/;s.gsub!(/[^#{c}-y]/i,' ')}}

Calling it:

f.call('Hello')

Hello
Hello
Hello
Hello
Hello
H llo
H llo
H llo
  llo
  llo
  llo
  llo
    o
    o
    o

Ruby, 70 67 bytes

f=->s{(?b..?y).each{|c|puts s if s=~/\S/;s.gsub! /[^#{c}-y]/i,' '}}

Thanks to @TuukkaX for pointing out some parens could be dropped (-3 bytes)

Calling it:

f.call('Hello')

Hello
Hello
Hello
Hello
Hello
H llo
H llo
H llo
  llo
  llo
  llo
  llo
    o
    o
    o
Source Link
Loading