this package includes extra features to
npm install persian-regex
const regex=require('persian-regex');
const persianString="سلام دنیا - سلام ایران "
const Email="[email protected]"
const Number="123456 "
console.log(regex.isPersian(persianString)); //true
console.log(regex.isPersian(Email)); //false
console.log(regex.isEmail(Number)); //false
console.log(regex.isEmail(Email)); // true
console.log(regex.isNumber(Email)); //false
import {isPersian,isEmail,isNumber} from "persian-regex";
const persianString="سلام دنیا - سلام ایران "
const Email="[email protected]"
const Number="123456 "
console.log(isPersian(persianString));
console.log(isEmail(Email));
console.log(isNumber(Number));
the result of methods , is boolean .
💗