What is FoxyProxy
FoxyProxy is a Chrome/Firefox add on that allows you to configure multiple proxies and use wildcard/regex to implement a complex variety of proxy rules giving you full control on how your traffic is managed between your browser and Burp.
For the basics on how to use FoxyProxy please go to https://help.getfoxyproxy.org/index.php/knowledge-base/how-to-use-your-proxy-service-with-firefox-and-foxyproxy-extension/; this should get you up and running on no time.
FoxyProxy URL Patterns guide: mostly wildcards with some regex guidance https://help.getfoxyproxy.org/index.php/knowledge-base/url-patterns/
FoxyProxy Regex Cheat Sheet.
Any regex can be used here 😊, to help to learn regex I would recommend https://regex101.com/
Hope it helps