Skip to content

Instantly share code, notes, and snippets.

@caingougou
Created February 28, 2013 05:42
Show Gist options
  • Save caingougou/5054506 to your computer and use it in GitHub Desktop.
Save caingougou/5054506 to your computer and use it in GitHub Desktop.
negative look-ahead
#!/usr/bin/env ruby
require "pp"
pattern = /^\w+(?!\.)$/
pp pattern =~ 'com.palm.system'
pp pattern =~ 'compalmsystem'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment