I want to simplify this expression a bit. Is there a better way to do this using lookups, or something? I'm pretty junior when it comes to regex. The params $3, $5 and $7 params are optional. $1 is required.
^
/application/
([0-9a-zA-Z_]+)
([\/]([0-9a-zA-Z_]+))?
([/\?|\?|\/]([^\?]*))?
([\?](.*))?
$
service => $1
target => $3
args => $5
filter => $7
/application/blender/banana?add=milk.
btw Im using RegExr to build and test expressions, its a great tool if you havent heard of it.