Skip to content

Instantly share code, notes, and snippets.

@maxaf
Created March 10, 2010 03:24
Show Gist options
  • Save maxaf/327487 to your computer and use it in GitHub Desktop.
Save maxaf/327487 to your computer and use it in GitHub Desktop.
scala> "foo.bar.baz".matches("bar.baz")
res80: Boolean = false
scala> "foo.bar.baz".matches(".*bar.baz.*")
res81: Boolean = true
max@upsight:~$ perl -e '("foo.bar.baz" =~ /bar.baz/) && print "yes\n"'
yes
max@upsight:~$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment