email regex
JavaScript
const emailRegx=/^(([^<>()[\]\\.,;:\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,}))$/;# Python
r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)"
^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
[\w._%+-]+@[\w.-]+\.[a-zA-Z]{2,3}# Language: Perl
sub Validate_Email($)
{
my $sEmail = $_[0];
my $sRetMsg = "";
my $sUserNmRegex = "^[[:alnum:]]+([.!#\$\%&'*+-\/=?^_'{|]?[[:alnum:]]+)*";
my $sDomainRegex = "@[[:alnum:]]+([.-]{1}[[:alnum:]]+)*";
my $sEndRegex = "([.]{1}[[:alnum:]]+)+";
# Work
#--------#
if ($sEmail =~ /$sUserNmRegex$sDomainRegex$sEndRegex$/) {
$sRetMsg = "Email is valid";
}
else {
$sRetMsg = "Email is not valid";
}
return $sRetMsg;
}
my $sEmail = '[email protected]';
print "[Email:$sEmail] : " . Validate_Email($sEmail) . "\n";
# OUTPUT -> [Email:[email protected]] : Email is valid
Also in JavaScript:
- Title
- app script append two list
- Category
- JavaScript
- Title
- cascading dropdown for forms react
- Category
- JavaScript
- Title
- How to send JSON Web Token (JWT Token) as header with Postman and golang
- Category
- JavaScript
- Title
- compare string by several strings js
- Category
- JavaScript
- Title
- ${ js
- Category
- JavaScript
- Title
- Array Helpers
- Category
- JavaScript
- Title
- how to return an object in javascript
- Category
- JavaScript
- Title
- create react app deployment heroku
- Category
- JavaScript
- Title
- get date one week from now javascript
- Category
- JavaScript
- Title
- how to concatenate strings javascript
- Category
- JavaScript
- Title
- disable autocomplete javascript
- Category
- JavaScript
- Title
- includes()
- Category
- JavaScript
- Title
- how to fill false into array javascript
- Category
- JavaScript
- Title
- check if number appears odd number of times in array javascript
- Category
- JavaScript
- Title
- get query string javascript nodejs
- Category
- JavaScript
- Title
- iterate over object javascript
- Category
- JavaScript
- Title
- javascript exercism.io bob solution
- Category
- JavaScript
- Title
- indexof javascript
- Category
- JavaScript
- Title
- iso to date javascript
- Category
- JavaScript
- Title
- flask get summernote text
- Category
- JavaScript
- Title
- how accurate is pi javascript
- Category
- JavaScript
- Title
- "..." in javascript
- Category
- JavaScript
- Title
- clone an object javascript
- Category
- JavaScript
- Title
- append img to svg d3 js
- Category
- JavaScript
- Title
- dockerfile for nodejs
- Category
- JavaScript
- Title
- express fingerprint
- Category
- JavaScript
- Title
- erela client userID
- Category
- JavaScript
- Title
- angular flex layout
- Category
- JavaScript
- Title
- forever loop in js
- Category
- JavaScript
- Title
- bot discord comment récupérer la pdp de quelqu'un
- Category
- JavaScript
- Title
- is forEach sync js
- Category
- JavaScript
- Title
- angular event emitter
- Category
- JavaScript
- Title
- ionic modal navbar not showing
- Category
- JavaScript
- Title
- display none in jquery
- Category
- JavaScript
- Title
- array.splice javascript
- Category
- JavaScript
- Title
- angular onchange event
- Category
- JavaScript
- Title
- javascript capitalize words
- Category
- JavaScript
- Title
- express server replit
- Category
- JavaScript
- Title
- How do you call a functional component in React
- Category
- JavaScript
- Title
- A cookie associated with a cross-site resource at http://placeholder.com/ was set without the `SameSite` attribute.
- Category
- JavaScript
- Title
- default props react
- Category
- JavaScript
- Title
- how to make ajax request javascript
- Category
- JavaScript
- Title
- hide element by name javascript
- Category
- JavaScript
- Title
- dotenv not loading process.env in node
- Category
- JavaScript
- Title
- capitalize first letter javascript
- Category
- JavaScript
- Title
- input output ionic
- Category
- JavaScript
- Title
- eyeshot javascript version
- Category
- JavaScript
- Title
- get attribute value jquery
- Category
- JavaScript
- Title
- javascript check if string ends with
- Category
- JavaScript
- Title
- how to get element by title js
- Category
- JavaScript
- Title
- can we import jquery library from developer tools
- Category
- JavaScript
- Title
- angular lifecycle hooks
- Category
- JavaScript
- Title
- isogram
- Category
- JavaScript
- Title
- how to convert time to am pm in javascript
- Category
- JavaScript
- Title
- javascript check if string contains substring
- Category
- JavaScript
- Title
- is undefined javascript
- Category
- JavaScript
- Title
- get value of checked radio button jquery
- Category
- JavaScript
- Title
- console.log in jsx
- Category
- JavaScript
- Title
- document ready
- Category
- JavaScript
- Title
- how to attach javascript to html
- Category
- JavaScript
- Title
- how to push array
- Category
- JavaScript
- Title
- ascii to char in javascript
- Category
- JavaScript
- Title
- graal.js javascript array in java
- Category
- JavaScript
- Title
- change innertext javascript
- Category
- JavaScript
- Title
- inline z-index react
- Category
- JavaScript
- Title
- javascript access pushed element
- Category
- JavaScript
- Title
- convert object to json javascript
- Category
- JavaScript
- Title
- functional component react
- Category
- JavaScript
- Title
- check array for duplicate values javascript
- Category
- JavaScript
- Title
- convert 2 lists to json python
- Category
- JavaScript
- Title
- d3 not reading json
- Category
- JavaScript
- Title
- how to delete a variable in js
- Category
- JavaScript
- Title
- form validation in reactstrap
- Category
- JavaScript
- Title
- bookshelf insert multiple rows
- Category
- JavaScript
- Title
- callback in response node.js
- Category
- JavaScript
- Title
- hover vanilla javascript
- Category
- JavaScript
- Title
- get screen width javascript
- Category
- JavaScript
- Title
- how to generate random string in javascript
- Category
- JavaScript
- Title
- document addeventlistener click
- Category
- JavaScript
- Title
- if str contains jquery
- Category
- JavaScript
- Title
- integer to array javascript
- Category
- JavaScript
- Title
- arrow function javascript ie11
- Category
- JavaScript
- Title
- find the last occurrence of a character in a string javascript
- Category
- JavaScript
- Title
- async fetch api call
- Category
- JavaScript
- Title
- async await catch error
- Category
- JavaScript
- Title
- brute force search javascript
- Category
- JavaScript
- Title
- add custom marker in react-mapbox-gl
- Category
- JavaScript
- Title
- detect a click outside an element javascript
- Category
- JavaScript
- Title
- call javascript function after page load complete
- Category
- JavaScript
- Title
- find the matching property
- Category
- JavaScript
- Title
- Date gethours js
- Category
- JavaScript
- Title
- append rotated triangle in anchor tag
- Category
- JavaScript
- Title
- how to get last string in javascript
- Category
- JavaScript
- Title
- how to add up all the numbers in between 0 and that number
- Category
- JavaScript
- Title
- how to check if a string has only alphabets in javascript
- Category
- JavaScript
- Title
- how to make a div scrollable
- Category
- JavaScript
- Title
- bootstrap js cdn
- Category
- JavaScript
- Title
- convert json to 2d array
- Category
- JavaScript
- Title
- how to add objects in array
- Category
- JavaScript
- Title
- express redirect
- Category
- JavaScript