i need to extract the numbers alone from this text i use sub string to extract the details some times the number decreases so i am getting an error value…
example(16656);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
Patternto compile your regular expression andMatcherto get a particular captured group. The regex I’m using is:which captures the digits (
\d+) within the parentheses. So: