Problem Statement : We have few users whose email ID contains apostrophe (') and when they add their email ID in VBCS fields, email ID regex is not accepting apostrophe (').
I tried multiple regex options available onvarious forums but in below code is not accepting.
Code : Below is the existing regex code provided in VBCS email component.
<oj-input-text virtual-keyboard="email"
validators='[{"type":"regexp", "options":{"pattern":"([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})", "hint":"Enter email address.", "messageDetail": "Value must be of the form xxx@xxx.xx"}}]'
label-hint="" class="oj-flex-item oj-sm-flex-initial" id="email" label-edge="provided" value="{{ $variables.emailAddress}}">
</oj-input-text>
Expectaion : Can you please suggest on how to update the regex so that it can accept apostrophe (').
Note that apostrophe (`) can easiliy added in regex and it works as well but the required apostrophe (') which is not working in above regex.
Few example of email with apostrophe (') :
conan.d'elia@example.com
conan.o'brien@example.com