abcdã¨efgã«å²ã¾ããæååã欲ããã¨ããã text = 'abcd123efg' re = Regexp.new('(abcd(.*)efg)') m = re.match(text) puts m[0] # -> abcd123efg puts m[1] # -> abcd123efg puts m[2] # -> 123 ããã欲ãããã¤æ¬å¼§ãã㢠ãã¿å http://www.geocities.jp/m_hiroi/light/abcruby06.html åè ã¡ã¿ããã°ã©ãã³ã°Ruby
{{#tags}}- {{label}}
{{/tags}}