regexes.txt 107 B

12345
  1. str =~ /^(?:foo)$/
  2. str =~ %r{foo|bar|buz$}
  3. str =~ %r!foo|bar$!
  4. str =~ %r[foo|bar$]
  5. str =~ %r(\(foo|bar\)$)