Regular expression visualizer using railroad diagrams
See related links to what you are looking for.
Shibuya.pm #16 ãå¤ã®æ£è¦è¡¨ç¾ç¥ããã§ãæ£è¦è¡¨ç¾ã®ã話ãããã¦ããã ãã¾ããã ã¾ãããé»è©±çªå·ã«ãããããæ£è¦è¡¨ç¾ãã¨ããéµä¾¿çªå·ã«ãããããæ£è¦è¡¨ç¾ãã¨ãããæ¸ããã¦ããã©ããã©ãããããæç·©ããããã£ã¦è©±ã ããã ãã¶ã¯ããã£ãããªã ã¨ããããã¹ã©ã¤ãã«æ¸ããã®ã§ãçºè¡¨ãã覧ã«ãªã£ã¦ãªãæ¹ã¯ã¹ã©ã¤ãããã覧ãã ããã ãµã¨è¦è¿ãã¨ããã®ããã°ã§é»è©±çªå·ã®æ£è¦è¡¨ç¾ãå ¬è¡¨ããã®ã¯ 3 度ç®ã§ãããããããã ãã¶çµã£ã¦ã¾ããã ä»ã§ã¯ãã£ã¨å³å¯ãªæ£è¦è¡¨ç¾ãä½ã£ã¦ãã¾ãã ããã¦ãNumber::Phone::JP ã«ç¶ããNumber::ZipCode::JP ã¨ããé çãªã¢ã¸ã¥ã¼ã«ãå ¬éãããè¨å¿µã§ãéµä¾¿çªå·ã«ãããããæ£è¦è¡¨ç¾ãä»ååãã¦å ¬éãã¾ãããããããããã¾ã§å³å¯ãªæ£è¦è¡¨ç¾ãå ¬éããããã¨èªä½ãæ¬é¦åå ¬éã£ã¦ã¤ãã§ãããã Shibuya.pm ã§ãè¨ãã¾ããã
ç±³Googleã¯3æ11æ¥ãæ£è¦è¡¨ç¾ã©ã¤ãã©ãªãRE2ããçºè¡¨ãããåä½ãé«éã§ãã¹ã¬ãããã¬ã³ããªã¼ããªç¹ãç¹å¾´ãå¾æ¥ã®ããã¯ãã©ãã¯åæ£è¦è¡¨ç¾ã©ã¤ãã©ãªã®ä»£æ¿ã¨ãã¦éçºãé²ãã¦ããã Googleã«ããã¨ãå社ã¯Code SearchãSawzallã¨ãã£ãã¤ã³ãã©ãã¢ããªã±ã¼ã·ã§ã³ã§æ£è¦è¡¨ç¾ãå©ç¨ãã¦ããããããã¯ãã©ãã¯ã¢ã«ã´ãªãºã ãå©ç¨ããå¾æ¥ã®æ£è¦è¡¨ç¾å®è£ ã§ã¯å ¥åãã¼ã¿ã«å¯¾ãå¦çæéãææ°çã«å¢å ãããã¨ãåé¡ã¨ãªã£ã¦ãããã¾ããåºå®ãµã¤ãºã®ã¹ã¿ãã¯ãæã¤C++ã®ãã«ãã¹ã¬ããããã°ã©ã ã®å ´åãå¾æ¥ã®æ£è¦è¡¨ç¾å®è£ ã§ã¯ã¹ã¿ãã¯ã使ãåã£ã¦ã¹ã¿ãã¯ãªã¼ãã¼ããã¼ãçºçããããã¨ããã£ãã¨ããããããã解決ããããã«ç¬èªã®æ£è¦è¡¨ç¾ã¨ã³ã¸ã³ãéçºããã¨ã®ãã¨ã RE2ã¯ã©ã®ãããªå ¥åãæ£è¦è¡¨ç¾ã«å¯¾ãã¦ãä¸å®ã®å°ããã¡ã¢ãªéã§åä½ããããã«éçºããã¦ããã®ãç¹å¾´ããªã¼ãããã³çè«ã®ä¸ãå¦
ã¿ã¤ãã«å¤ãã¾ãããæ§ã¿ã¤ãã«ãJavaScriptã§ãã使ãæ¸ãæ¹ãããã使ããã©æ¯åå¿ããã æ£è¦è¡¨ç¾ã«ããããããã©ããã RegExp#testã使ãã /abc/.test("abcdefg") // => true String#searchã¯ãããããä½ç½®ãè¿ãããããããªãå ´åã¯-1ãå é ã«ãããããã¨0ã§falseãªã®ã§æ³¨æãçå½å¤ã欲ããå ´åã¯String#searchã使ããªãã "abcdefg".search(/xxx/) // => -1 "abcdefg".search(/def/) // => 3 "abcdefg".search(/abc/) == false // => true æ£è¦è¡¨ç¾ã®é¨åããããå¾ãã é¨åããããå¾ãã«ã¯ãRegExp#execãString#matchã使ããexecã¨matchã®é度ã¯å¤§ãã¦å¤ãããªãã æ£è¦è¡¨ç¾ã®ãã³ããã¼
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}