我需要从电子邮件中提取域,但我得到了 @domain.com。我不需要@
在域的开头
class ExtractDomain(webapp2.RequestHandler):
def get(self):
user = (str(users.get_current_user().email()))
domain = re.search("@[\w.]+", user)
thisdomain = domain.group()
template_values = {'user': user, 'thisdomain':thisdomain}
template = jinja2_env.get_template('templates/domain.html')
self.response.out.write(template.render(template_values))