I am trying to capture URLs before a specific word. The only problem is that this word can also be part of the domain.
Examples: (I'm trying to capture everything before dinner)
https://breakfast.example.com/lunch/dinner/
https://breakfast.example.brunch.com:8080/lunch/dinner
http://dinnerdemo.example.com/dinner/
I can use:
^ (. *: //.*/) (? = dinner /?)
The problem I am facing is that the look does not seem lazy enough So the following happens:
https://breakfast.example.com/lunch/dinner/login.html?returnURL=https://breakfast.example.com/lunch/dinner/
as it is captured:
https://breakfast.example.com/lunch/dinner/login.html?returnURL=https://breakfast.example.com/lunch/
, .
, , ?