Created
December 6, 2011 02:24
-
-
Save suin/1436415 to your computer and use it in GitHub Desktop.
制御文字を取り除く方法(改行コードは保持) ref: http://qiita.com/items/1295
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', $string); // The line feed and carriage return will be saved. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment