Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 26, 2024 01:18 PM
I have a base with records that consist of the URLs of several images inside my site's midia folder. They look something like:
- https://mysite.com/news/april/banner1.png
- https://mysite.com/news/may/banner2.png
- https://mysite.com/news/april/etc/week2/file.html
- https://mysite.com/tutorials/folder/name.pdf
Etc, fake examples.
I would like to extract just the names of the files inside each folder, like:
- banner1.png
- banner2.png
- file.html
- name.pdf
I figured it might be possible if I could FIND the last '/' on each string and extract whatever comes after it, but I'm not managing. Anyone knows if that's possible?
1 Reply 1
Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 27, 2024 05:05 AM
Hello @nataliagruber
Use this simple RegExp function which always gives you perfect results.
REGEX_EXTRACT(url, "[^/]+$")
👍
Reply
