I need to capture from the beginning of the url to the first instance of the /blog in the example url
https://subdomain.website.com/groups/aa-var-group-members-only-two/blog/2017/10/22/blog-post-3
the regular expression i have right now is (.*)/blog
is greedy and captures till the the last instance of "/blog" i.e
https://subdomain.website.com/groups/aa-var-group-members-only-two/blog/2017/10/22/blog
while my expected result is
https://subdomain.website.com/groups/aa-var-group-members-only-two/blog
can someone help me fix the regular expression