fork download
  1. /* l'L'l */
  2.  
  3. import java.io.*;
  4. import java.util.regex.Matcher;
  5. import java.util.regex.Pattern;
  6.  
  7. /* scan html for pattern and match. */
  8. class tagMatch
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. String line;
  13. String tweets;
  14.  
  15. while ((line = r.readLine()) != null) {
  16. Pattern pattern = Pattern.compile("(dir=\".+\">.+<a\\shref=).+rel");
  17. Matcher matcher = pattern.matcher(line);
  18. while (matcher.find()) {
  19. tweets = matcher.group(1);
  20. System.out.println(tweets);
  21. }
  22. }
  23. }
  24. }
Success #stdin #stdout 0.08s 380224KB
stdin
<div class="ProfileTweet-contents">

      <p class="ProfileTweet-text js-tweet-text u-dir"

        dir="ltr">Come join us now! <a href="http://content-available-to-author-only.co/Kbhh2ed" rel="nofollow" dir="ltr" data-expanded-url="http://f...content-available-to-author-only...k.com/" class="twitter-timeline-link" target="_blank" title="http://www.google.com" ><span class="tco-ellipsis"></span><span class="invisible">http://</span><span class="js-display-url">www.google.com</span><span class="invisible">/</span><span class="tco-ellipsis"><span class="invisible">&nbsp;</span></span></a> <a href="http://content-available-to-author-only.co/jIw2344dDZz" class="twitter-timeline-link u-isHiddenVisually" data-pre-embedded="true" dir="ltr" >pic.twitter.com/jIwtc23juZz</a></p>
stdout
dir="ltr">Come join us now! <a href=