fork download
  1. strs = ["abc", "ab+c", "+abc", "-+abc", "ab+-c"]
  2. strs.each { |x| p x.gsub(/(?!\A)[-+~]/, "") }
Success #stdin #stdout 0s 28216KB
stdin
Standard input is empty
stdout
"abc"
"abc"
"+abc"
"-abc"
"abc"