fork download
  1. import java.util.regex.*;
  2. import java.lang.*;
  3.  
  4. class Main
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. String mydata = "<a href=\"javascript:;\" id=\"listen_880966\" onclick=\"MP3PREVIEWPLAYER.showHiddePlayer(880966, 'http://m...content-available-to-author-only...e.fr/' + 'lol/mp3/Paint_It_Black/18_the_black_dahlia_murder_-_paint_it_black_(rolling_stones)-bfhmp3.mp3')\" title=\"Listen Paint it Black The Black Dahlia Murder Great Metal Covers 36\" class=\"button button-s button-1 listen \" >";
  9. Pattern pattern = Pattern.compile("'http://m...content-available-to-author-only...e.fr/'\\s.\\s'[\\(\\).A-Za-z0-9/_-]+'");
  10. Pattern title = Pattern.compile("title=\\\"[A-Za-z0-9\\s]+\\\"");
  11. Matcher matcher = pattern.matcher(mydata);
  12. if (matcher.find())
  13. {
  14. System.out.println(matcher.group(0));
  15.  
  16. }
  17. matcher = title.matcher(mydata);
  18. if(matcher.find())
  19. System.out.println(matcher.group(0));
  20. }
  21. }
Success #stdin #stdout 0.07s 380224KB
stdin
Standard input is empty
stdout
'http://m...content-available-to-author-only...e.fr/' + 'lol/mp3/Paint_It_Black/18_the_black_dahlia_murder_-_paint_it_black_(rolling_stones)-bfhmp3.mp3'
title="Listen Paint it Black    The Black Dahlia Murder   Great Metal Covers 36"