Use %r
for Ruby regular expressions, to avoid having to escape forward-slashes:
"http://domain.tld".match /^http:\/\// # => true
"http://domain.tld".match %r{^http://} # => true
Thanks to @joshsusser
Use %r
for Ruby regular expressions, to avoid having to escape forward-slashes:
"http://domain.tld".match /^http:\/\// # => true
"http://domain.tld".match %r{^http://} # => true
Thanks to @joshsusser