How can I use named capture with regex in PHP? Can anyone give me a working example?
Doesn't work with replace , only useful for match in php
$test="yet another test"; preg_match('/(?Pt[^s]+)/',$test,$matches); var_dump($matches['word']);