Regex To Match One Parameter In URL Query String

A regular expression to match one URL parameter in query strings. Can be used to filter requests on a specific parameter from the query string.

/&para(\=[^&]*)?(?=&|$)|^para(\=[^&]*)?(&|$)/

Matches:

  • https://regexpattern.com/query.php?query=true&para=123&bar=456

See Also: