Skip to content

Instantly share code, notes, and snippets.

@MrCoder
Last active January 15, 2020 05:16
Show Gist options
  • Save MrCoder/aa6634df15ecc70fe60b814423cec725 to your computer and use it in GitHub Desktop.
Save MrCoder/aa6634df15ecc70fe60b814423cec725 to your computer and use it in GitHub Desktop.
Useful regular exppressions

Replace continuous change lines (0x0A) with a single change line char

  1. simple case: \n+ -> \n
  2. remove space chars except for those on the last lin: (\n)[\n\s]*\n(\s*) -> $1$2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment