title: Find text into response using expression
body: <p>I have this code which I want to use to check domain registration:</p>
  <pre><code>    private final static String WHO =&quot;cnn.com&quot;;
      private final static String WHOIS_HOST = &quot;whois.verisign-grs.com&quot;;
      private final static int WHOIS_PORT = 43;
  
      public static void main(final String[] args) throws IOException {
          SpringApplication.run(TestApplication.class, args);
  
          int c;
          Socket socket = null;
  
          String query = WHO + &quot;\r\n&quot;;
          byte buf[] = query.getBytes();
  
  
          String regex = &quot;.*Registry Expiry Date:*&quot;;
  
          try {
              socket = new Socket(WHOIS_HOST, WHOIS_PORT);
              InputStream in = socket.getInputStream();
              OutputStream out = socket.getOutputStream();
  
              out.write(buf);
              out.flush();
  
              StringBuilder text = new StringBuilder();
              while ((c = in.read()) != -1) {
                  System.out.print((char) c);
                  text.append(c);
              }
  
              boolean matches = Pattern.matches(regex, text.toString());
  
  
              System.out.print(&quot;\nDone\n&quot; + matches);
          } catch (IOException ex) {
               System.out.print(ex.getMessage());
          } finally {
              if(socket != null){
                  try {
                      socket.close();
                  } catch (IOException ex) {
                   }
              }
          }
      }
  </code></pre>
  <p>I get this output:</p>
  <pre><code>   Domain Name: CNN.COM
     Registry Domain ID: 3269879_DOMAIN_COM-VRSN
     Registrar WHOIS Server: whois.corporatedomains.com
     Registrar URL: http://cscdbs.com
     Updated Date: 2018-04-10T16:43:38Z
     Creation Date: 1993-09-22T04:00:00Z
     Registry Expiry Date: 2026-09-21T04:00:00Z
     Registrar: CSC Corporate Domains, Inc.
     Registrar IANA ID: 299
     Registrar Abuse Contact Email: domainabuse@cscglobal.com
     Registrar Abuse Contact Phone: 8887802723
     Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
     Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited
     Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited
     Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited
     Name Server: NS-1086.AWSDNS-07.ORG
     Name Server: NS-1630.AWSDNS-11.CO.UK
     Name Server: NS-47.AWSDNS-05.COM
     Name Server: NS-576.AWSDNS-08.NET
     DNSSEC: unsigned
     URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
  &gt;&gt;&gt; Last update of whois database: 2022-07-29T20:55:54Z &lt;&lt;&lt;
  
  For more information on Whois status codes, please visit https://icann.org/epp
  
  NOTICE: The expiration date displayed in this record is the date the
  registrar's sponsorship of the domain name registration in the registry is
  currently set to expire. This date does not necessarily reflect the expiration
  date of the domain name registrant's agreement with the sponsoring
  registrar.  Users may consult the sponsoring registrar's Whois database to
  view the registrar's reported date of expiration for this registration.
  
  TERMS OF USE: You are not authorized to access or query our Whois
  database through the use of electronic processes that are high-volume and
  automated except as reasonably necessary to register domain names or
  modify existing registrations; the Data in VeriSign Global Registry
  Services' (&quot;VeriSign&quot;) Whois database is provided by VeriSign for
  information purposes only, and to assist persons in obtaining information
  about or related to a domain name registration record. VeriSign does not
  guarantee its accuracy. By submitting a Whois query, you agree to abide
  by the following terms of use: You agree that you may use this Data only
  for lawful purposes and that under no circumstances will you use this Data
  to: (1) allow, enable, or otherwise support the transmission of mass
  unsolicited, commercial advertising or solicitations via e-mail, telephone,
  or facsimile; or (2) enable high volume, automated, electronic processes
  that apply to VeriSign (or its computer systems). The compilation,
  repackaging, dissemination or other use of this Data is expressly
  prohibited without the prior written consent of VeriSign. You agree not to
  use electronic processes that are automated and high-volume to access or
  query the Whois database except as reasonably necessary to register
  domain names or modify existing registrations. VeriSign reserves the right
  to restrict your access to the Whois database in its sole discretion to ensure
  operational stability.  VeriSign may restrict or terminate your access to the
  Whois database for failure to abide by these terms of use. VeriSign
  reserves the right to modify these terms at any time.
  
  The Registry database contains ONLY .COM, .NET, .EDU domains and
  Registrars.
  
  Done
  false
  </code></pre>
  <p>Do you know how I can get only the line content <code>Registry Expiry Date: 2026-09-21T04:00:00Z</code>?</p>