POSTS

Ruby Backreference Pattern Matching for the Brain-Dead

Blog
irb(main):001:0> "capture to here!  leave this off".gsub(/(.*\!).*(\s+.*)$/, "\\1 and \\2")
=> "capture to here! and  off"