Skip to content

Instantly share code, notes, and snippets.

@termosa
Created April 3, 2021 07:04
Show Gist options
  • Save termosa/f36b9fc0f3026e6826e2d79edb742c4b to your computer and use it in GitHub Desktop.
Save termosa/f36b9fc0f3026e6826e2d79edb742c4b to your computer and use it in GitHub Desktop.
Regular expression that removes duplications
^(.*)(\n\1)+$
$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment