Extracing a specific text within a url

Copper Contributor

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

4 Replies

@fcbda 

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.

Possible scammer. URL links to a different site.

@Detlef Lewin not so, I found a generic site for confidentiality reasons. I assure you that I have no malicious intent.

@fcbda 

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