Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Extract a Part of a URL with extract text processor

avatar
Contributor

Hy everyone, 

I need help to extract a part from a url with the extratct text processor.

 

/organisations/60910c2f18572ebe8aa7a677/detailedLaborcosts? (Note the ID may change)

I expect this result 60910c2f18572ebe8aa7a677

 

Thanks for suggestions

2 ACCEPTED SOLUTIONS

avatar

Hi ,

Do you usually have the ID sorrounded with the same phrases all the time? like this:

/organisations/ID/detailedLaborcosts

If that is the case you can use the following regex in the extract text processor:

/organisations/([0-9a-z]+)/detailedLaborcosts

Hope that helps.

 

 

 

 

View solution in original post

avatar
Contributor

I have found the solution, for the changing parts of the url

https://mycompany\.my\.app/api/public/v1/organisations/([0-9a-z]+)/detailedLaborcosts.*

View solution in original post

3 REPLIES 3

avatar

Hi ,

Do you usually have the ID sorrounded with the same phrases all the time? like this:

/organisations/ID/detailedLaborcosts

If that is the case you can use the following regex in the extract text processor:

/organisations/([0-9a-z]+)/detailedLaborcosts

Hope that helps.

 

 

 

 

avatar
Contributor

Hi, thanks for your help.

Unfortunately it does not work, here is the entire URL I have also defined variables that are part of the URL. I had not considered that these must be taken into account

https://mycompany.my.app/api/public/v1/organisations/60910c2f18572ebe8aa7a677/detailedLaborcosts?month=#{today}&apiKey=myapikey
The components highlighted in red may change, the rest is constant

avatar
Contributor

I have found the solution, for the changing parts of the url

https://mycompany\.my\.app/api/public/v1/organisations/([0-9a-z]+)/detailedLaborcosts.*