title: How to filter text using start and end string or character
body: <p>Can anyone assist me in filtering the banner message and extract only the text "13:12:03.539 UTC Sun Mar 6 2015" as output?</p>
  
  <pre>C
  -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=-
  S Y S T E M   A C C E S S   W A R N I N G
  -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=-
  You have connected to a private network.  This system is to only be used
  by authorized personnel for authorized business purposes.  All activity
  is monitored and logged.  Unauthorized access or activity is a violation
  of law.
  If you have connected to this system by mistake, disconnect now.
  
  13:12:03.539 UTC Sun Mar 6 2015
  C
  -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=-
  S Y S T E M   A C C E S S   W A R N I N G
  -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=-
  You have connected to a private network.  This system is to only be used
  by authorized personnel for authorized business purposes.  All activity
  is monitored and logged.  Unauthorized access or activity is a violation
  of law.
  If you have connected to this system by mistake, disconnect now.
  
      Line       User       Host(s)              Idle       Location
  *514 vty 0     vijay.dada idle                 00:00:01 X.X.X.X
    Interface    User               Mode         Idle     Peer Address
  C
  -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=-
     S Y S T E M   A C C E S S   W A R N I N G
  -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=-
  You have connected to a private network.  This system is to only be used
  by authorized personnel for authorized business purposes.  All activity
  is monitored and logged.  Unauthorized access or activity is a violation
  of law.
  If you have connected to this system by mistake, disconnect now.</pre>
  
  <p>I tried using the below code unable to make it work.Request to assist.</p>
  
  <pre><code>$arr = @()
  $path = "yourFilePath"
  $pattern = "(?&lt;=.*C
  -)\w+?(?=disconnect now.*)"
  
  Get-Content $path | Foreach {
      if ([Regex]::IsMatch($_, $pattern)) {
          $arr += [Regex]::Match($_, $pattern)
      }
  }
  $arr | Foreach {$_.Value}
  </code></pre>