how can extract last part and second last part (or maybe more) parts of url and put it into the new columns?
lets say
mydata:
user view
1 https://domain.ca/courses/43/pages/general-guidelines
2 https://domain.ca/courses/43/id=33/svgl11/hi/resources
3 https://domain.ca/courses/43/505/pages/detail-specification
result:
user secondlastPart lastPart
1 pages general-guidelines
2 hi resources
3 pages detail-specification
how can I do it in R?