I have written a program using Pattern and Matcher in Java to produce a string in between a group of characters. My code is currently:
String trying = "75px;"; Pattern tryingPattern = Pattern.compile("(?<="+Pattern.quote(trying)+").*?(?=center)", Pattern.MULTILINE); Matcher tryingMatcher = tryingPattern.matcher(pageContentString); while (tryingMatcher.find()) { docketFile.write(tryingMatcher.group().toString()); } I am attempting to obtain the information between the "75px;" and and the word "center". The issue is that any time a sequence comes up as shown below with the information on several lines, it is not recognizing the pattern even though the beginning and ending string exist. I am not sure based off my code why information including line breaks will not allow the pattern to be recognized.
Sample data below.
<td align=*left* valign=*top* style=*width:75px;*>03/04/2013</td><td align=*left* valign=*top*>D6</td><td align=*left* valign=*top*>SR</td><td align=*left*>SUMS AMENDED COMPLNT(20967973) SENT BY CERTIFIED MAIL. TO: CUYAHOGA CLERK OF COURTS 1200 ONTARIO CT CLEVELAND, OH 44113-0000 </td><td align=*center*><a href=*DisplayImageList.aspx?q=03WzlSkU6oMVIiKW14aCZBTEV4FirUMU0*><img src=*images/ImageSheet.png* alt=** /></a></td> </tr><tr style=*background-color:Gainsboro;*>