#pragma once

#include <regex>
#include <string>

namespace hack::security
{
  inline bool validate_email(std::string& email)
  {
    const std::regex pattern("(\\w+)(\\.|_)?(\\w*)@(\\w+)(\\.(\\w+))+");
    return std::regex_match(email, pattern);
  }
}
