2

Here's the regex I'm using:

.*?\@(?!yahoo|gmail|hotmail).*

Basically I'm trying to get all non-yahoo/gmail/hotmail email addresses. The above works, however if someone types "ISHOUTATEVERYONE@YAHOO.COM" then it won't match.

I've tried searching around for an answer but nothing working. Is this possible?

I'm trying to use this on a HTML5 Input Pattern attribute:

<input type="email" pattern=".*?\@(?!yahoo|gmail|hotmail).*" title="Email Address (no yahoo, gmail or hotmail)" id="emailaddress" name="emailaddress" required="">

Jamie Barker
  • 8,145
  • 3
  • 29
  • 64

1 Answers1

1

.*?\@(?![yY][aA][hH][oO][oO]|[gG][mM][aA][iI][lL]|[hH][oO][tT][mM][aA][iI][lL]).*

Thanks to @hjpotter92

Jamie Barker
  • 8,145
  • 3
  • 29
  • 64