I want to replace the last ip address with the * method {$ vo. ip | preg_replace ((? : D +.) {3}) d +, \ 1 *, ###} the system prompts Parseerror: syntaxerror, unexpected: inC: wampwwwguestbookguestbookRu. could you tell me the thinkphp template function usage problem?
I want to replace the last ip address with * The following method:
{$ Vo. ip | preg_replace = '/((? : \ D + \.) {3}) \ d +/',' \ 1 *',###}
Error message
Parse error: syntax error, unexpected ':' in C: \ wamp \ www \ guestbook \ Runtime \ Cache \ Guestbook \ b5add68846b01_3035d53dc5ca1074b. php on line 34 is a high-handed answer, and I will replace the previous output without telling me how to replace the previous output. I just want to know how to replace the template output. thank you.
------ Solution --------------------
$ Str = preg_replace ("/\-> \ w + $/", "", $ _ GET ['name']);