What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-27 21:15:02
javascript regex french phone number
function regexPhoneNumber(str) { const regexPhoneNumber = /^((\+)33|0)[1-9](\d{2}){4}$/; if (str.match(regexPhoneNumber)) { return true; } else { return false; } } let phoneNumber = "+33777777777"; console.log(regexPhoneNumber(phone... Add solution -
Javascript 2022-03-20 05:50:12
js match regex
//Declare Reg using slash let reg = /abc/ //Declare using class, useful for buil a RegExp from a variable reg = new RegExp('abc') //Option you must know: i -> Not case sensitive, g -> match all the string let str = 'Abc abc abc' str.match(/abc/) //... Add solution -
Javascript 2022-03-19 08:00:26
javascript regex email
function validateEmail (emailAdress) { let regexEmail = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/; if (emailAdress.match(regexEmail)) { return true; } else { return false; } } let emailAdress = "[email protected]"; console.... Add solution -
Other 2022-03-16 18:10:11
flutter regex validation
You could make the first part optional matching either a + or 0 followed by a 9. Then match 10 digits: ^(?:[+0]9)?[0-9]{10}$ ^ Start of string (?:[+0]9)? Optionally match a + or 0 followed by 9 [0-9]{10} Match 10 digits $ End of string Regex demo Add solution