Hate coming up with titles. I need something that'll actually capture the following:
site.com/500/ (a number as the first param)
site.com/500/ABC/ (a number and a 3 letter code)
site.com/500/ABC/DEF/ (a number and 2x 3 letter codes)
What I have been messing with:
^(\d+/)?(\w{3}/)?(\w{3}/)?$
That sort of works but includes the slashes in the arguments (so I end up with "500/"). Moving the slashes outside of the brackets won't match /500/ABC/ since the ? only works on the slash.
Obviously I can make it in multiple ones but I'm sure there's a way to do it in one go.
As well, I only want the actual arguments, since as I said it can work but ends up adding slashes to them, which isn't too good.
Thanks for any help.