* matches zero or more of previous tokens
Tailored string /:foo/apple/banana/:foo/:1234
/:foo* matches: /:foo/apple/banana/:foo/:1234
^^^^^ ^^^^^
(.*)- a capture group that will match all 0 or more of the previous characters. The symbol in question is a wild card, which means that when we see /:foo, we will continue to match until we reach the end of the line
Tailored string /hello/world/:foo/bar?id=123
/:foo(.*) matches /hello/world/:foo/bar?id=123
^^^^^^^^^^^^^^^^
source
share