i have the following two regular expressions(in btw order).
1. ^~/buying/(.*)\?(.*) => foo= group 1 baa= group 2.
2. ^~/buying/(.*) => foo= group 1 baa= nothing/empty/null/baibai
What I'm trying to do is if the url has a question mark, then divide it into two groups. Otherwise, just throw all the things in the first group.
the reason why order is important to me is that if I switch them, then ?? regex will never run because expression # 2 (above) will catch everything.
So, can this be fixed?
NOTE. I tried using this website ** to help me debug / tune ... but I can't figure it out.
** I have no connection with this site.
source
share