'Search after a number pattern

I'm new to this. I just copied my frist script to "tampermonkey".

Im trying to find a pattern of numbers on a website like 500500, 600600, 707070, and similar.

I have this code:

$(document).ready(function () {
  var LookFor = "test"; // Change this to find a different string

  if ($('body:contains("' + LookFor + '")').length > 0) {
    alert("Found: " + LookFor);
  } else {
    location.reload();
  }
});

But I dont know how to search after patterns. I would appreciate if you could help me out.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source