Wondering if this is a correct way to use Regex in Python. Basically I want to be able to set CORS headers with a regex pattern.
My URL string is
https://([a-zA-Z0-9-]+[.])*some.subdomain.com
Will this parse correctly during run time and will it accommodate any letter plus a dash before "some"?
Will headers be correctly set? For example when a user gets to
https://e-g.some.subdomain.com
will CORS header that was set with the Regex pattern allow this URL to work?
Edit:
After some research, do I need to use the 'r'
SOME_URL = r'https://([a-zA-Z0-9-]+[.])*some.subdomain.com'