title: Extract OTP (6 digit) from SMS - Android
body: <p>I have a broadcast receiver which listens for sms. When Sms arrives I have the whole text but am concerned with only the OTP.</p>
  
  <p>My challenge is how to extract the 6 digit otp. I can't use regex because sms format might change.</p>
  
  <p>example " Thanks for registering your otp is 123456"</p>
  
  <p>I want 123456.  sms structure can change but otp will always be a 6 digit figure</p>