Skip to content

Instantly share code, notes, and snippets.

@lucasmezencio
Created July 19, 2012 14:41
Show Gist options
  • Save lucasmezencio/3144398 to your computer and use it in GitHub Desktop.
Save lucasmezencio/3144398 to your computer and use it in GitHub Desktop.
Dotall Regexp in Java
//You need to use the Pattern.DOTALL flag to say that the dot should match newlines. e.g.
Pattern.compile(regex, Pattern.DOTALL);
//or specify the flag in the pattern using (?s) e.g.
String regex = "(?s)([a-zA-Z0-9]+)";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment