Skip to content

Instantly share code, notes, and snippets.

@marcustyphoon
Created July 28, 2023 13:18
Show Gist options
  • Save marcustyphoon/fd379b914dce1a92e634b4f8719c84f4 to your computer and use it in GitHub Desktop.
Save marcustyphoon/fd379b914dce1a92e634b4f8719c84f4 to your computer and use it in GitHub Desktop.
\s whitespace regex: [\r\n\t\f\v \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]
\r <Carriage Return> (CR)
\n <End of Line> (EOL, LF, NL)
\t <Character Tabulation> (HT, TAB)
\f <Form Feed> (FF)
\v <Line Tabulation> (VT)
Space (SP)
\u00a0 No-Break Space (NBSP)
\u1680 Ogham Space Mark
\u2000-\u200a En Quad, Em Quad, En Space, Em Space, Three-Per-Em Space, Four-Per-Em Space, Six-Per-Em Space, Figure Space, Punctuation Space, Thin Space, Hair Space
\u2028 Line Separator
\u2029 Paragraph Separator
\u202f Narrow No-Break Space (NNBSP)
\u205f Medium Mathematical Space (MMSP)
\u3000 Ideographic Space
\ufeff Zero Width No-Break Space (BOM, ZWNBSP)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment