regex snippet
Email validation regex
Pragmatic email pattern for most forms.
^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$
Use with case-insensitive flag to keep the pattern readable:
const emailPattern = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i;
regex snippet
Pragmatic email pattern for most forms.
^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$
Use with case-insensitive flag to keep the pattern readable:
const emailPattern = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i;
Iterate through files and print their names.
Throttle rapid calls to run only after the delay.
Tiny wrapper for JSON requests with error handling.
Create nested directories safely with -p.
Safely read a UTF-8 file with context managers.
Create or overwrite a UTF-8 file with a newline.