fork download
  1. var input = "leoshi\nSample text for testing:<a href=\"http://w...content-available-to-author-only...u.com\" title=\"leoshi\">leoshi</a>leoshi for details balala...";
  2. var pattern = /<a.*?>.*leoshi.*<\/a>|(leoshi)/;
  3. var match = pattern.exec(input);
  4. var inputMatches = match !== null && match[1] !== null;
  5. print(inputMatches);
  6.  
Success #stdin #stdout 0.02s 30432KB
stdin
Standard input is empty
stdout
true