How to match some-blog-slug
in all scenarios below:
/blog/some-blog-post-slug/whatever/anything
(CASE 0)/blog/some-blog-post-slug/whatever
(CASE 1)/blog/some-blog-post-slug/
(CASE 2)/blog/some-blog-post-slug
(CASE 3)
I'm trying: ^/\/blog\/([^\/]+)/
But it's not working at all.
I need to match some-blog-post
so I can extract it from the string.
PS.: Sorry to post another REGEX question here on SO.