Created
July 19, 2012 14:41
-
-
Save lucasmezencio/3144398 to your computer and use it in GitHub Desktop.
Dotall Regexp in Java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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