Email counter/ Wrong email remover script | Web Scripts | Crax

Welcome To Crax.Pro Forum!

Check our new Marketplace at Crax.Shop

   Login! SignUp Now!
  • We are in solidarity with our brothers and sisters in Palestine. Free Palestine. To learn more visit this Page

  • Crax.Pro domain has been taken down!

    Alternatives: Craxpro.io | Craxpro.com

Email counter/ Wrong email remover script

Email counter/ Wrong email remover script

LV
1
 

harchaoui2

Member
Joined
Nov 9, 2023
Threads
10
Likes
4
Awards
4
Credits
666©
Cash
0$
this is the script, like and share it :
<!DOCTYPE html>
<html>
<head>
<title>Email Counter and Wrong Email Remover</title>
</head>
<body>
<h1>Email Counter and Wrong Email Remover</h1>

<!-- Input area for entering email addresses -->
<label for="emailInput">Enter email addresses (comma-separated):</label>
<input type="text" id="emailInput" placeholder="e.g., email1@example.com, email2@example.com">
<button onclick="countAndRemoveEmails()">Count & Remove</button>

<!-- Display the count and removed emails -->
<p>Total Email Count: <span id="emailCount">0</span></p>
<p>Incorrect Emails Removed: <span id="removedEmails"></span></p>

<script>
function countAndRemoveEmails() {
// Get the input value and split it into an array of email addresses
const emailInput = document.getElementById("emailInput").value;
const emailArray = emailInput.split(",").map(email => email.trim());

// Initialize variables to keep track of the count and removed emails
let emailCount = 0;
let removedEmails = [];

// Regular expression for validating email format
const emailRegex = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/;

// Iterate through the email array
for (let i = 0; i < emailArray.length; i++) {
const email = emailArray;
if (emailRegex.test(email)) {
// Valid email, increment count
emailCount++;
} else {
// Invalid email, add it to the list of removed emails
removedEmails.push(email);
}
}

// Update the HTML to display the count and removed emails
document.getElementById("emailCount").textContent = emailCount;
document.getElementById("removedEmails").textContent = removedEmails.join(", ");
}
</script>
</body>
</html>
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Tips
Tips
Top Bottom