Skip to content

Instantly share code, notes, and snippets.

@quanon
Last active September 4, 2018 05:57
Show Gist options
  • Save quanon/b990ecb4732b064c57e0f269139aeeff to your computer and use it in GitHub Desktop.
Save quanon/b990ecb4732b064c57e0f269139aeeff to your computer and use it in GitHub Desktop.
改行コードを統一する
"ほげ\nほげ\rほげ\r\n".gsub(/(?<!\r)\n|\r(?!\n)/, "\r\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment