via. PHP in Action | Readable regular expressions ã²ãã£ã¨ããããå¤ããããããã¿ããç¥ãã¾ãããã æ£è¦è¡¨ç¾ã¯ä¸éãèªãã¦ãããããã«ãªãã¨é常ã«å¼·åã§ããããã ãã©ããã¦ãæå·ã¿ãããªè¨è¿°ã«ãªããã¡ã§ã ;-) ãã¨ãã°ã <?php $regex = '/(\w+\s+){6}\w+/'; ã¨ããæ£è¦è¡¨ç¾ããã£ãå ´åããwããsãã®æå³ãåãã£ã¦ããã°é£ããã¯ããã¾ããããè¤éãªæ£è¦è¡¨ç¾ã®å ´åãæ¸ããæ¬äººãåãããªããªã£ã¦ãã¾ãäºãããããç¥ãã¾ããã ããã§ã <?php $word = "\w+"; $spaces = "\s+"; $regex = "/($word$spaces){6}$word/"; ã¨æ¸ããã¨ã§ãèªãããæ£è¦è¡¨ç¾ã«ã§ããããã¾ããæ¥æã表ãæ£è¦è¡¨ç¾ãç´ ç´ã« 'dddd-dd-dd dd:dd:dd'ã¨ããæ¹
{{#tags}}- {{label}}
{{/tags}}