Forum Discussion

fcbda's avatar
fcbda
Copper Contributor
May 13, 2021

Extracing a specific text within a url

I have an example url as follows:

 

http://1secretsofsuccess.com

 

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's avatar
      fcbda
      Copper Contributor

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

      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        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

         

  • 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.

Resources