Skip to content

Instantly share code, notes, and snippets.

@jpr5
Created August 31, 2010 01:46
Show Gist options
  • Save jpr5/558388 to your computer and use it in GitHub Desktop.
Save jpr5/558388 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
s = "I really think this regexp engine sucks, why don't they just use PCRE?"
re = /((\w+\s*)+ regexp)$/
re.match(s)
puts "NIH, muthafuckaz, NIH!!!!!!!!" # p.s you'll never see this line
@postmodern
Copy link

:mod +Text.Regex.Posix

let s = "I really think this regexp engine sucks, why don't they just use PCRE?"
let r = "((\\w+\\s*)+ regexp)$"
s =~ r :: Bool

(Definitely not Ruby code, but they seem to get it right.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment