Skip to content

Instantly share code, notes, and snippets.

@miketierney
Created November 20, 2008 04:55
Show Gist options
  • Save miketierney/26943 to your computer and use it in GitHub Desktop.
Save miketierney/26943 to your computer and use it in GitHub Desktop.
if options[:fast]
options[:ignorecase] ? pattern = Regexp.new(Regexp.escape(ARGV.shift), 1) : pattern = Regexp.new(Regexp.escape(ARGV.shift))
elsif options[:ignorecase]
pattern = Regexp.new(ARGV.shift, 1)
else
pattern = Regexp.new(ARGV.shift)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment