title: Regex to match both slash in JAVA
body: <p>I want to match forward slash <code>/</code> or back slash <code>\</code> in particular string for e.g.:<br>
  1. <code>Hi/Hello/Bye/</code><br>
  2. <code>Hi\Hello\Bye\</code><br>
  3. <code>Hi\Hello/Bye\</code><br>
  4. <code>HiHelloBye</code><br>
  In the given strings only the last record should not be matched because it does not contain either <code>/</code> or <code>\</code>.  </p>
  
  <p><strong>What I am using</strong>  </p>
  
  <pre><code>if (strFile.matches(".*//.*"))
  {
      //String Matches.
  }
  else
  {
      //Does not match.
  }
  </code></pre>
  
  <p>This matches for forward slash <code>/</code> only. I don't know how to write regex for both slash (for <code>OR</code> condition).</p>