Have URL'S which has a numeric value in it. Need to extract that numeric value. But the numeric value position is not constant in the URL. Need a generic way how to extract. Can't use the split method because the position of the value is not constant.
For example:
1. https:// www.example.com/A/1234567/B/D?index.html
2. http://www.example.com/A?index.html/pd=1234567
3. http://www.example.com/A/B/C/1234567?index.html
So the above three URL'S has a numeric value whose position is not constant. Can you please provide a generic method where I can get the expected output like "1234567".