note 15790 added to pcre.pattern.modifiers
| From: | php-general at lists dot php dot net | Date: | Wed, 03 Oct 2001 08:36:42 +0000 |
| Subject: | note 15790 added to pcre.pattern.modifiers | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18499@lists.php.net to get a copy of this message | ||
Find the PGP keys within a block of text using a Perl-style regular expression
modified with the the "dot all" (s) and ungreedy (U) pattern modifiers.
<?php
preg_match_all(
...."/-----BEGIN PGP PUBLIC KEY BLOCK-----.+-----END PGP PUBLIC KEY BLOCK-----/sU",
....$data,
....$matches
);
print_r ($matches);
?>
--
http://www.php.net/manual/en/pcre.pattern.modifiers.php
http://master.php.net/manage/user-notes.php?action=edit+15790
http://master.php.net/manage/user-notes.php?action=delete+15790
http://master.php.net/manage/user-notes.php?action=reject+15790