Skip to content

Instantly share code, notes, and snippets.

@jwadhwani
Last active February 7, 2016 15:48
Show Gist options
  • Save jwadhwani/a0d514bae32505ba8b55 to your computer and use it in GitHub Desktop.
Save jwadhwani/a0d514bae32505ba8b55 to your computer and use it in GitHub Desktop.
A snippet in PHP using preg_replace to remove excess line feeds
<?php
$data = preg_replace('/\x0a+/', "\x0a", $data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment