.od
matches any three-character string ending with "od", including "hod", "mod", and "nod".[hm]od
matches "hod" and "mod".[^m]od
matches all strings matched by .od
except "mod".^[hm]od
matches "hod" and "mod", but only at the beginning of the string or line.[hm]od$
matches "hod" and "mod", but only at the end of the string or line.\[.\]
matches any single character surrounded by "[" and "]" since the brackets are escaped, for example: "[a]" and "[b]"./(product1|product2)$
Matches:
https://my-domain.com/product1
https://my-domain.com/product2
but NOT
https://my-domain.com/product1/
https://my-domain.com/products/product1
https://my-domain.com/product3
.*\/(product1|product2)\/$
Matches:
https://my-domain.com/product1/
https://my-domain.com/product2/
AND
https://my-domain.com/products/product1/
but NOT
https://my-domain.com/product1
https://my-domain.com/product2
https://my-domain.com/product3
.*\/(product1|product2)\/?$
Matches:
https://my-domain.com/product1
https://my-domain.com/product2
AND
https://my-domain.com/product1
https://my-domain.com/product1/
https://my-domain.com/products/product1
https://my-domain.com/products/product1/
https://my-domain.com/product2
https://my-domain.com/product2/
https://my-domain.com/products/product2
https://my-domain.com/products/product2/
https://my-domain.com/products/details/product1
etc
but NOT
https://my-domain.com/product3
https://my-domain.com/products/product3