“Regex validasi email” Kode Jawaban

Regex validasi email

const emailRegex = RegExp(
    /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
  );
Lovely Lapwing

Regex validasi email

^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$
Wandering Wolverine

Regex validasi email

// Simple and very useful regex. Just Pass your email whare is email here
const regex = /\S+@\S+\.\S+/
regex.test(email here)
Nazmul Hassan

Regex validasi email

const validateEmail = (email) => {
  return String(email)
    .toLowerCase()
    .match(
      /^(([^<>()[\]\\.,;:\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,}))$/
    );
};
Gleaming Gaur

Regex validasi email

[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?
Clumsy Caracal

Regex validasi email

python
r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)"
Blue-eyed Beetle

Jawaban yang mirip dengan “Regex validasi email”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya