I am trying to come up with a regular expression that matches the following URLs:
http://test.com/bobs/your/uncle/1
http://test.com/bobs/your/uncle/5
http://test.com/bobs/your/uncle/5?tab=1
But does not match the following URLs:
http://test.com/bobs/your/uncle/1/brah/5
http://test.com/bobs/your/uncle/1/brah/5?tab=2
I tried the following regex
/bobs/your/uncle/\d+\??
Which works for the first three URLs above, but not the last two.