fixed problem with parsing regex in java 6