Guest User

Untitled

a guest
Jan 15th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. pattern = Pattern.compile("Действующие вещества:.*[^c]class"">(.*)[^<]</a>");
  2. matcher = pattern.matcher(s);
  3. while(matcher.find()){
  4. dop1.put("Действующие вещества", matcher.group(1));
  5. }
  6.  
  7. String regex = "(?s)Действующие вещества:.*?class="">(.*?)</a>";
  8.  
  9. String s = "Действующие вещества:</td>n" +
  10. " <td><a href="" class="">*</a></td>";
  11. Pattern pattern = Pattern.compile("(?s)Действующие вещества:.*?class="">(.*?)</a>");
  12. Matcher matcher = pattern.matcher(s);
  13. while(matcher.find()) {
  14. System.out.println("Действующие вещества: "+ matcher.group(1));
  15. }
  16. // => Действующие вещества: *
Add Comment
Please, Sign In to add comment