Forums
Regular expression for valid name and email - Printable Version

+- Forums (https://bdn.bdb.ai)
+-- Forum: BDB Knowledge Base (https://bdn.bdb.ai/forumdisplay.php?fid=13)
+--- Forum: BDB Dashboards Designer (https://bdn.bdb.ai/forumdisplay.php?fid=43)
+---- Forum: BDB Designer Q & A (https://bdn.bdb.ai/forumdisplay.php?fid=16)
+---- Thread: Regular expression for valid name and email (/showthread.php?tid=489)



Regular expression for valid name and email - Sruthi P - 12-23-2022

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,}))$/;