Regex for Email Validation in JavaScript (Tested)
A simple email regex for JavaScript forms, compared with a strict pattern and the browser's own check on ten addresses, plus a regex that froze for 1.5s.
Notes
Security notes, SOC lab write-ups and tested code by Mahir Faysal, a SOC Level 1 cybersecurity learner in Bangladesh, plus notes from my Next.js and Gemini projects. Sample posts are marked and drafts stay in the admin area.
A simple email regex for JavaScript forms, compared with a strict pattern and the browser's own check on ten addresses, plus a regex that froze for 1.5s.
A dark mode toggle that remembers the choice in localStorage, follows the system setting on a first visit and never flashes white on reload. Tested code.
Send JSON with fetch(): method, Content-Type and JSON.stringify, the two mistakes that send an empty body, response.ok checks, timeouts and FormData.
A ten-line JavaScript debounce function with real output: fast typing turned into one search, keeping this, cancel(), and a leading-edge version for buttons.
A small offline habit tracker in plain HTML and JavaScript: habits saved as JSON in localStorage, streaks from local dates, a 7-day row and a JSON backup.
A beginner async/await tutorial: async functions, try/catch, fetch with response.ok, Promise.all for parallel work, retries, and the forEach mistake to avoid.
0%