Pattern srcAttrPattern = Pattern.compile("(?i)(?<=src=\")[^\"]*(?<!\")");
Matcher srcMatcher=srcAttrPattern.matcher("src=\"\"");
System.out.println(srcMatcher.find());
This prints false. How do I interpret the above code ? Is there any modification needed to include src="" for the above code to serve purpose of empty as well as filled string. This statement is basically to match the src tag in <img> of html contents.
(?="). But why go to all the trouble with a slow as paint dry assertions.. Use something more reasonable,src="(.*?)"