Can't make regex ignore line terminator - fixed
I've gotten this problem fixed in-house. Thanks for looking.
I'm not new to Java, but I am new to this community and I didn't see a more appropriate forum to post this question. I'm trying to break apart a block of HTML code by extracting the text between "</table>" and "<br /><br />". In the middle of this block are several instances of "<br />\x0d\x0a<br />" , the two break tags separated by a carriage return/line feed pair. I'm using the regex
which always matches the first instance of "<br />\x0d\x0a<br />" . I'm running Eclipse 3.4, and I've turned on the Pattern.DOTALL and Pattern.CASE_INSENSITIVE flags. I tried turning on PATTERN.MULTILINE, which, as expected, didn't help. I tried explicitly testing for the line terminator with
The added regex terms have no effect - I get exactly the same match as I do without them. If I remove the *? quantifier, the regex fails. If I quote the "\\x0d\\x0a", the regex fails.
I've hexdumped the HTML code and I can see that the CR and LF are there, but the regex seems blind to them. Any advice would be really appreciated. Thanks,