Skip to content

Instantly share code, notes, and snippets.

@hokamoto
Created March 9, 2013 11:46
Show Gist options
  • Save hokamoto/5123936 to your computer and use it in GitHub Desktop.
Save hokamoto/5123936 to your computer and use it in GitHub Desktop.
lexer test
import java.util.regex.Pattern;
public class Temp {
public static void main(String[] args) {
System.out.println(Pattern.compile("^0$|^0^[0-9]+|^[1-9][0-9]*").matcher("0^1").find());
}
}
@hokamoto
Copy link
Author

hokamoto commented Mar 9, 2013

output: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment