Skip to content

Instantly share code, notes, and snippets.

@jorgeas80
Created January 14, 2020 16:23
Show Gist options
  • Save jorgeas80/0ad8731483f8bf74939aa99847ede283 to your computer and use it in GitHub Desktop.
Save jorgeas80/0ad8731483f8bf74939aa99847ede283 to your computer and use it in GitHub Desktop.
Useful regexp
# Delete starting and ending blank spaces
s/^\s+|\s+$|\s+(?=\s)
# Delete duplicated lines, after sorting
^(.+)$\n^\1$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment