Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular expression for valid name and email
#1
How to write regular expression pattern for valid name and email?

var myRe = /^([C][F])+-[A-Z]{2}-[A-Z]{3}-\d{3}$/ ;

var result_id=myRe.test(fleet_id);
var myEmail = /^(([^<>()\[\]\\.,;:\s@']+(\.[^<>()\[\]\\.,;:\s@']+)*)|('.+'))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
Reply


Messages In This Thread
Regular expression for valid name and email - by Sruthi P - 12-23-2022, 10:49 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)