How to extract a section of a URL?
Options
Brandon Hassler
Member ✭
I'm positive Xano has an easy(ish) way of doing this, but I just can't land my finger on it.
I have a list of Amazon URL's that I'm needing to extract the ASIN values from. Luckily, in this list Amazon always has the ASIN following the /dp/ folder. See here:
I'd like to avoid using regex as much as possible here, but with this predictable pattern, is there an easy way to grab that portion of the URL?
Best Answer
-
I actually just found another answer in here from the brilliant @Ray Deck that (I think) answered my question. You can read his response here and below you can see how I ended up implementing it. If there is a better way anybody knows about, by all means let me know!
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback