<?php
$test = "dark gray squirrel";
$r = "!s.+!";
$r2 = "{s.+}";
$r3 = "~s.+~";
preg_match($r,$test,$matches);
var_dump($matches);
preg_match($r2,$test,$matches);
var_dump($matches);
preg_match($r3,$test,$matches);
var_dump($matches);
- Output for 7.0.0 - 7.0.25, 7.1.0 - 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
- array(1) {
[0]=>
string(8) "squirrel"
}
array(1) {
[0]=>
string(8) "squirrel"
}
array(1) {
[0]=>
string(8) "squirrel"
}
preferences:
196.2 ms | 404 KiB | 182 Q