<?php $text = 'My Name is #P_NAME# and \r\n I am #P_AGE# years old'; //$r = '#[^#]+#'; $r = '#[(?<name>\S+)\]#'; $r = '#.+?#'; $r = '#(.+?)#'; $r = '#\w*#'; preg_match_('/'.$r.'/', $text, $m); var_dump($m);
You have javascript disabled. You will not be able to edit any code.