Does the AWS CloudFormation allowed pattern will allow # symbol in the email address
<p>We are using an # symbol for DL list in our company. For example, #test-emailcheck@example.com. Through AWS CloudFormation template we are validating the email address. But the example which I mentioned is not accepted by AWS. Below is my template which works for usual email id like test.emailcheck@example.com,</p>

<pre><code>"contactemail": {
      "Description": "REQUIRED whatever dev or ops email list is appropriate for your project",
      "Type": "String",
      "AllowedPattern": "^[\\w-\\+]+(\\.[\\w]+)*@[\\w-]+(\\.[\\w]+)*(\\.[a-z]{2,})$",
      "ConstraintDescription": "must be a valid email address"
    },
</code></pre>

<p>I modified the allowed pattern to make it work with the # symbol in regex online <a href="https://regex101.com/r/uY6uH1/1" rel="nofollow">https://regex101.com/r/uY6uH1/1</a>. Eventhough it accepted here. When I tried the same in AWS CF, It doesn't work. How I can achieve this in AWS CF template. </p>

<p>Note : # may be changed to $,&amp; anything in future. So I dont want to hard code all my special characters in the Regex</p>