Has a URL that has a numerical value in it. It is necessary to extract this numerical value. But the position of the numeric value is not constant in the url. Need a general way to extract. You cannot use the split method because the position of the value is not constant.
For instance:
1. https:
2. http:
3. http:
Thus, the above three URLs have a numeric value whose position is not constant. Can you provide a general method in which I can get the expected result, for example "1234567".
source
share