Subtracted in the lessons here is such an example:
<?php $preg = '[az]{4}[0-9]{5}'; $string = 'abcd12345efg'; preg_match($preg, $string, $arr); print_r($arr); ?>
As I understand it, the pattern '[az] {4} [0-9] {5}' is equal to the pattern: '[az] [az] [az] [az] [0-9] [0-9] [0- 9] [0-9] [0-9] '
How not to twist, as a result I get:
Warning: preg_match () [function.preg-match]: Unknown modifier '{' in C: wwwreg.php on line 6
And such an error occurs when a second pair of curly or square brackets appears.
Tell me, what am I doing wrong here?