Skip to content

Instantly share code, notes, and snippets.

@sylvaincombes
Last active April 8, 2024 21:07
Show Gist options
  • Save sylvaincombes/886944c7780791f68f62 to your computer and use it in GitHub Desktop.
Save sylvaincombes/886944c7780791f68f62 to your computer and use it in GitHub Desktop.
Regular expression to find image tag in html without an alt attribute
<img(?=\s|>)(?!(?:[^>=]|=(['"])(?:(?!\1).)*\1)*?\salt=['"])[^>]*.*?\/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment