I am parsing some text files using a buffered reader. I use regular expressions to match different lines to their appropriate cases. I can parse one file fine but when I run the parse on multiple files, I get
Exception in thread "main" java.util.regex.PatternSyntaxException: Unmatched closing ')' near index 3
view)
The thing is, I never get it in the same place twice. It will occur in the middle of words and never in the same word twice. I don't know if anyone might have an inkling of an idea on this one...
here are the patterns I'm using:
Expand|Select|Wrap|Line Numbers
- Pattern origin = Pattern.compile("Date of origin: .*");
- Pattern review = Pattern.compile("Last review date: .*");
- Pattern condition = Pattern.compile("Clinical Condition: .+");
- Pattern variant = Pattern.compile("Variant \\d+: .+");
- Pattern blank = Pattern.compile("\\s*");
- Pattern Heading4 = Pattern.compile("Radiologic Procedure Rating .*");
- Pattern Heading3 = Pattern.compile("Rating Comments.*");
- Pattern Footer4 = Pattern.compile("Rating Scale: .+");
- Pattern Footer3 = Pattern.compile("Appropriateness Criteria Scale.*");
- Pattern References = Pattern.compile("References.*");
- Pattern PageHeaderStart = Pattern.compile("An ACR Committee on Appropriateness Criteria and its expert panels have developed criteria for determining appropriate imaging examinations for diagnosis and treatment of specified medical.*");
- Pattern ReferenceStart = Pattern.compile("\\d+\\Q.\\E .+");
Karl