May 13 2021 09:58 AM
I have an example url as follows:
https://www.****.com/***/*****/a.346778818742590/3975284149225354/?type=3&comment_id=*******&reply_c... |
I want to be able to extract the second number, 3975284149225354 , from the link. Not every URL is the same however they all share the same pattern where there is a "/" then the first number and then another "/" then the second number. Is there a way to do this using text formula or will I have to use VBA regex?
The stars are there for confidentiality purposes.
Thanks
Thanks
May 13 2021 10:47 AM
Let's say the URL is in A1. In another cell in row 1, enter the formula
=TRIM(MID(SUBSTITUTE(A1,"/",REPT(" ",255)),1400,255))
This can be filled down if required.
May 13 2021 11:00 AM
May 13 2021 11:49 AM
@Detlef Lewin not so, I found a generic site for confidentiality reasons. I assure you that I have no malicious intent.
May 13 2021 12:34 PM
What is the exact logic?
- is it always after Nth slash (N is always the same)
- is it first number between slashes (a.346... is not a number)
- something else