$regex = \'$....$\' $regex = \'^...^\'
In the above two cases,how to use ^/$ to match the beginning/end of a string?
^/$
just do escaping ?
$str='^...^'; preg_match("/^\^.*\^$/",$str,$matches); print_r($matches);