I am currently trying to figure out the regex to grab last part of the path location. I thought of two ways to approach it, either extracting the last part, or use a if statement to figure where there are 2 periods or 3 periods as a search field. I would also to have the last part printed out if possible, I am not familiar with regex.
Examples of the path location are like this /Users/jeremy/desktop/dns/example1.com.csv
and /Users/jeremy/desktop/dns/example2.extra.com.csv
Outcomes with the regex is:
example1.com.csv
or example2.extra.com.csv
Any help is appreciated