firasdib/Regex101

What exactly is then Exact Regular Expression?

Closed this issue · 1 comments

Bug Description

I am testing following Regular expression for testing email
/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$/gm
email sunilpandya@hotmail.com sunil.pandya02@gmail.com
But your Tester says no match found
then what is the exact regular expression, all programmer for php
Regular expression suggest above Regular Expression for PHP

Reproduction steps

Expected Outcome

Browser

Include browser name and version

OS

Include OS name and version

Hi @sunilpandya,

The regular expression you pasted has ^ and $ which mean start of line and end of line respectively, given that the /m flag is on. Therefore you'd have to have a single email address per line, to test if it matches.

If you need further help with regex, please use the social button at the top right and pick your favorite platform. Github issues are more suited for bugs and feature requests rather than help with understanding or coming up with a regex.