Using str.format() is the new standard for formatting strings in Python 2.6, and Python 3. I\'ve run into an issue when using str.format() with reg
str.format()
Per the documentation, if you need a literal { or } to survive the formatting opertation, use {{ and }} in the original string.
{
}
{{
}}
'^(w{{3}}\.)?([0-9A-Za-z-]+\.){{1}}{domainName}$'.format(domainName = 'delivery.com')