- var_dump: documentation ( source)
- preg_match: documentation ( source)
<?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);