1.2.1570. ext/pcre¶
Extension ext/pcre. PCRE stands for Perl Compatible Regular Expression. It is a standard PHP extension.
<?php
$zip_code = $_GET['zip'];
// Canadian Zip code H2M 3J1
$zip_ca = '/^([a-zA-Z]\d[a-zA-Z])\ {0,1}(\d[a-zA-Z]\d)$/';
// French Zip code 75017
$zip_fr = '/^\d{5}$/';
// Chinese Zip code 590615
$zip_cn = '/^\d{6}$/';
var_dump(preg_match($_GET['zip']));
?>
See also Regular Expressions (Perl-Compatible).
1.2.1570.1. Specs¶
Short name |
Extensions/Extpcre |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Available in |