Regular expression visualizer using railroad diagrams
åºç¤å ¥éç·¨ã¨ç½®æå¦çç·¨ã§æ£è¦è¡¨ç¾ã«ã¤ãã¦èª¬æãã¾ãããããã§ã¯ããã¾ã§ã«ç»å ´ããæ£è¦è¡¨ç¾ãæ´çãã¦ã¾ã¨ãã¦ãã¾ããä¸é¨ç»å ´ãã¦ããªããã®ãå«ã¾ãã¦ãã¾ãã æ£è¦è¡¨ç¾ã«ã¤ãã¦è©³ããç¥ãããæ¹ã«ã¯ã詳説 æ£è¦è¡¨ç¾ã(é称ãã¯ãã¦æ¬)ããå§ãã§ãã
ãµã¼ãã¹çµäºã®ãç¥ãã ãã¤ãYahoo! JAPANã®ãµã¼ãã¹ããå©ç¨ããã ãèª ã«ãããã¨ããããã¾ãã ã客æ§ãã¢ã¯ã»ã¹ããããµã¼ãã¹ã¯æ¬æ¥ã¾ã§ã«ãµã¼ãã¹ãçµäºãããã¾ããã ä»å¾ã¨ãYahoo! JAPANã®ãµã¼ãã¹ããæ顧ãã ããã¾ãããããããããé¡ããããã¾ãã
self =~ other -> Integer | nil[permalink][rdoc][edit] æ£è¦è¡¨ç¾ other ã¨ã®ããããè¡ãã¾ããããããæåããã°ãããããä½ç½®ã®ã¤ã³ããã¯ã¹ããããã§ãªããã° nil ãè¿ãã¾ãã other ãæ£è¦è¡¨ç¾ã§ãæååã§ããªãå ´å㯠other =~ self ãè¡ãã¾ãã ãã®ã¡ã½ãããå®è¡ãããã¨ãçµã¿è¾¼ã¿å¤æ° $~, $1, ... ã«ãããã«é¢ããæ å ±ãè¨å®ããã¾ãã [PARAM] other: æ£è¦è¡¨ç¾ããã㯠=~ ã¡ã½ãããæã¤ãªãã¸ã§ã¯ã [EXCEPTION] TypeError: other ãæååã®å ´åã«çºçãã¾ãã ä¾ p "string" =~ /str/ # => 0 p "string" =~ /not/ # => nil p "abcfoo" =~ /foo/ # => 3
WEBç³»æè¡å±ã®ç®¡ç人ãããããã»ãã¸ã¿ã«ä¸å¿ã«æ¥æ©ãã¤ãã¤ã LinuxããRubyãJavascriptãªã©ãªã©è¨äºãè¼ãã¦ãã¾ã mukaer.com # æ£è¦è¡¨ç¾ /patern/ ã¹ã©ãã·ã¥ã§å²ã p = %r!patern! %è¡¨è¨ # æ¼ç®å =~ ä¸è´ãã !~ ä¸è´ããªã # ã¡ã¿æå [abc] a b cã¨ããã [a-z] abcdefg..zã¨ããã [a-zA-Z] abcdefg..z ABC..Zã¨ããã [^a] a以å¤ã®æå \A æååã®å é \Z æååã®æ«å°¾ \nã§ããã \z æååã®æ«å°¾ \nã§ã¯ããããããªã ^ æååã®è¡é åèªã®å é !!æååã®éä¸ã§ãããããã!! $ æååã®æ«å°¾ åèªã®æ«å°¾ !!æååã®éä¸ã§ãããããã!! . 1æå \s ã¹ãã¼ã¹ \S ã¹ãã¼ã¹ä»¥å¤ \d æ°å \D \dä»¥å¤ \w è±æ°åã¨_ [0-9a
æååã®æ¤ç´¢ãæååã®æ¸å¼ãã§ãã¯ã«ä½¿ãã ãã§ãæ£è¦è¡¨ç¾ã¯ä¾¿å©ãªã®ã§ããã©ãç½®æã®éã«ã使ããããã«ãªãã¨ãæ£è¦è¡¨ç¾ãä½åã便å©ã«æãããã¾ãã å¤æ©è½ãªããã¹ãã¨ãã£ã¿ã§ããã°ããã¦ãã¯æ£è¦è¡¨ç¾ãç¨ããç½®æããµãã¼ããã¦ãã¾ããããã°ã©ãã³ã°ããæ¹ã ãã§ãªãããã¹ãã¨ãã£ã¿ã§æç« ãæ¸ãã¦ããæ¹ã«ã¨ã£ã¦ã便å©ãªéå ·ã¨ãªãã¾ãã®ã§ãæ£è¦è¡¨ç¾ã«ããç½®æå¦çããã²èº«ã«ã¤ãã¦ãã£ã¦ä¸ããã ãªãããã®ãã¼ã¸ã¯åºç¤å ¥éç·¨ãèªã¿çµããæ¹ãæ³å®ãã¦ããã¾ããæ£è¦è¡¨ç¾ã«ã¤ãã¦åãããªããã¨ãããã°ãã¡ããã覧ä¸ããã ç»å ´ããæ£è¦è¡¨ç¾ã¯ãªãã¡ã¬ã³ã¹ã«ã¾ã¨ãã¦ããã¾ããã¾ã¨ãã¦æ¯ãè¿ãæãªã©ã¯ãã¡ããã覧ä¸ããã ã¾ãã¯åºæ¬ãããåç´ãªæååç½®æãç´¹ä»ãã¾ããç½®æã§ã¯ãããããã¿ã¼ã³ãã¨ãç½®ææååãã®äºã¤ãæå®ãããã¨ã«ãªãã¾ããä¾ãã°ããã ãããããä¸ãããã«ç½®æããå ´åãããããã¿ã¼ã³ã¨ç½®ææååã¯ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}