@giovanny.lueilwitz 
To make a query parameter optional in a regular expression, you can use the question mark (?) symbol after the parameter you want to make optional. Here is an example:
Let's say you have a URL pattern that includes a query parameter "page":
1
 | 
^https://example.com/path?page=d+$  | 
To make the "page" parameter optional, you can add the question mark after the parameter:
1
 | 
^https://example.com/path(?page=d+)?$  | 
This will match URLs with or without the "page" parameter attached.