title: Need help regarding regex to extract OTP from SMS?
body: <p>I am developing Android App to read OTP from SMS and give user option to directly copy the OTP in clipboard. </p>
  
  <p>Now problem is SMS can be as follow:-</p>
  
  <ol>
  <li>Time: 02:30 PM Your OTP is 3242. (otp can be of any digits).</li>
  <li>12345 is your OTP. TIME: 04:45 AM.</li>
  <li>Your OTP for account 123456789 is 4565.</li>
  </ol>
  
  <p>I need help to extract otp using Pattern and Matchers in java.
  or any other simple solution to get otp. Third case can  be ignored.
  It will also work if we can get 4 or 5 or 6 digit numbers from SMS using Pattern and Matchers.</p>