regex - How to do pattern matching on mulit line string? -


mystring = " <div class="text">     spor     </div> ";  pattern ="<div class=\"text\">(.*)</div>"; pattern regex = pattern.compile(pattern, pattern.multiline);  matcher m = regex.matcher(mystring); if (m.find()) {     match = m.group(1); } else {  match = "---"; } 

not working ?

the 'dot' character doesn't include line break characters default.
have enable pattern.dotall.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -