I have a string COR000001. I want to split it so that I get only the integer 1. If the String is like COR000555 I should get the integer 555. Thank you…
Share
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.
The easiest method to use is to get rid of the first three characters
"COR","MCR","TCP", etc.. and then useparseIntwith the appropriate parameters such as in the below.If the “key” in the beginning is not always limited to three characters you could use a regular-expression to get all the digits in the end of your string.
.. as in the below;