drone uses the path.Match function for matching parameters, which supports a glob syntax. The glob syntax is not restricted to prefix or suffix, and can be used anywhere in a string. You can read more about the syntax and see some examples of how this function works here:
Just for posterity and so I don’t forget, you totally can use that code block I originally posted above. The golang docs linked above are a nice way to verify expressions in the browser.