Skip to content

Instantly share code, notes, and snippets.

@T99
Last active July 27, 2021 12:12
Show Gist options
  • Save T99/292fdf2ebfde22033dfb929cad849e1b to your computer and use it in GitHub Desktop.
Save T99/292fdf2ebfde22033dfb929cad849e1b to your computer and use it in GitHub Desktop.
Broken/Improperly-escaped quote character regex
// Matches broken 'quot' escaped strings (i.e. '"' characters).
((^|[^&a-zA-Z])quot($|[^;a-zA-Z])|(^|[^&a-zA-Z])quot;|&quot($|[^;a-zA-Z]))
// Matches:
// - quot
// - quot;
// - &quot
// Does not match:
// - quote
// - quotient
// - unquote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment