Skip to content

Instantly share code, notes, and snippets.

@jackbrown
Created June 5, 2014 06:26
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 jackbrown/327c519e657a1ff24f8b to your computer and use it in GitHub Desktop.
Save jackbrown/327c519e657a1ff24f8b to your computer and use it in GitHub Desktop.
Regular expression for finding a regular expression in a file
/(?!\/\/)(\/)(?!.*?(com|net|com\.au|co\.uk))(.*?){1,}(\/i?g?m?y?)/g
Example: http://regexr.com/38uu8
TODO: get it working with regular expressions that contain \/
TODO: flags should be allowed in any order or combination
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment