title: How do I check if a text contains an IP address?
body: <p>I've searched around but have not found anything that works. How do I check if a text contains an IP address? I have tried this but it does not work:</p>
  
  <pre><code>    public boolean ip(String a_text) {
      String ip_filter = "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}";
      if (a_text.toLowerCase().contains(ip_filter.toLowerCase())){
          return true;
      }
      return false;
  }
  </code></pre>