Hello,
I want the extract everything after the second slash(/)
OR
Everything from the last till the first slash (/) -- Both scenario works for me
Example -
generation/abcd/giveandtake-messages-to-s
generation/xyz/giveandtake-messages-speedline-s
Perfect! Thanks
| rex ".+/.+/(?<message>.*)"
Restricting the firs two strings to character classes
[^/]+/[^/]+/(?<message>.*)
gives big performance boost (prevents backtracking).
Thank you!
Can we do from the end as well? Right to left till the special charater?
/(?<message>[^/]+)$
If you want to capture everything after the last slash, you can do something like
.*/(?<message>[^/]*)$