Use gsc regex builder and tester in a repeatable workflow
Add literal words or URL directories and choose contains, exact, prefix or directory matching.
Paste example queries or full URLs. Review included and excluded examples before copying the expression.
In Search Console, open a Query or Page Custom (regex) filter and choose the displayed match mode. Validate important filters in Search Console.