What is the placeholder writing format in the Regular Expression of PHP? Is there more information? For example: {code ...} what is the placeholder writing format in the Regular Expression of PHP? Is there more information?
For example:
$ A = '{$ name}'; $ _ patten = '/\ {\$ ([\ w] + )\}/'; // match the {Variable} in the template. // pay $ this-> _ tpl $ tpl = preg_replace ($ _ patten, "\ 1" after the template content is replaced ".'
', $ A); echo $ tpl; here \ 1 can also be changed to $1, representing the content of the first () matching Regular Expression
Reply content:
What is the placeholder writing format in the Regular Expression of PHP? Is there more information?
For example:
$ A = '{$ name}'; $ _ patten = '/\ {\$ ([\ w] + )\}/'; // match the {Variable} in the template. // pay $ this-> _ tpl $ tpl = preg_replace ($ _ patten, "\ 1" after the template content is replaced ".'
', $ A); echo $ tpl; here \ 1 can also be changed to $1, representing the content of the first () matching Regular Expression
I don't know whether you are asking about the regular expression rules or the placeholder of the matching result. The placeholder of the matching result is in the format of \ 1 \ 2 \ 3.
The first error is written. It is the usage of all placeholders in the regular expression. I cannot find any materials ~~ Whining...