I would like to syntax a regular expression which will match two server names. The server names are example.com and www.example.com. In particular, a regular expression for www or nothing
I wrote the following regular expression (www\.|)example.com Nginx configuration file is compatible with Perl programming language. While it should work, it doesn't seem to work. I cannot find the proper regular expression. Does anyone have an idea how to synatx the regular expression?
Thanks