Skip to content

Instantly share code, notes, and snippets.

@bds
Created November 18, 2010 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bds/704559 to your computer and use it in GitHub Desktop.
Save bds/704559 to your computer and use it in GitHub Desktop.
Regex creator
Regexp.new(%w[ www www3 ].collect { |p| Regexp.escape(p) }.join('|'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment