æè¿å°ã調ã¹ã¦ããã®ããPHPã®ä»»æã³ã¼ãå®è¡ç³»ã®èå¼±æ§ã§ããä¸ã§ããpreg_replaceé¢æ°ï¼Perläºæã®æ£è¦è¡¨ç¾ã«ããç½®æãè¡ãªãããã®é¢æ°ï¼ãä¸é©åãªæ¹æ³ã§ä½¿ã£ãå ´åã«çºçããèå¼±æ§ã«ã¤ãã¦èª¿ã¹ã¦ãã¾ããã ãã£ãããªã®ã§ãæ¥è¨ã«ã¾ã¨ãã¦ã¿ã¾ãã 3種é¡ã®èå¼±æ§ preg_replaceé¢æ°ã使ã£ãPHPã³ã¼ãå®è¡ç³»ã®èå¼±æ§ã«ã¯ã大ããåãã¦3ã¤ã®ç¨®é¡ãããã¾ãã 第ä¸å¼æ°ã¸ã®æ¿å
¥ã許ã e修飾åä»ãã»ç¬¬äºå¼æ°ã¸ã®æ¿å
¥ã許ã e修飾åä»ãã»ç¬¬ä¸å¼æ°ã¸ã®æ¿å
¥ã許ã 以ä¸ã§ããããã«ã¤ãã¦è¦ã¦ããã¾ãã ã¿ã¤ãï¼ï¼ç¬¬ä¸å¼æ°ã¸ã®æ¿å
¥ 以ä¸ã®ã³ã¼ãã«ãä»»æã®PHPã³ã¼ããå®è¡å¯è½ãªèå¼±æ§ãããã¾ãã $m = preg_replace("/([^<]*)$kw([^>]*)/i", "\\1<font color=red>$kw</font>\\2", $m); $kwã¨$mã¯å¤é¨ãã
{{#tags}}- {{label}}
{{/tags}}