note 96327 deleted from function.preg-match by danbrown
| From: | danbrown@php.net | Date: | Wed, 03 Aug 2011 13:08:48 +0000 |
| Subject: | note 96327 deleted from function.preg-match by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-182141@lists.php.net to get a copy of this message | ||
Note Submitter: Becheru Petru-Ioan
----
http://pw-newspaper.googlecode.com/ project
provides code for matching strings of printable ASCII(space to tilda) with newlines (newline is
formed CR and LF).
<?php
preg_match('/^[ -~\xA\xD]{0,65535}$/i', "Hello\n World!");
?>
There are more line terminators that CR or LF: see http://en.wikipedia.org/wiki/Newline#Unicode