We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Regexp:
#new(string, option, code) -> Regexp : 保存しておく。 .last_match : $~ .last_match(n) : $& .try_convert : (いらない) .union : (いらない) #== : かんたんで後回し #hash : ...? てきとうにでっちあげれば良い? #inspect : なんとでもなるだろう #named_captures : REエンジンによっては書けるか? Posixでは無理。 #names : Posix では無理 #to_s : うーん...? 変化しないことの保証は厳しそう $& : Regexp.last_match[0] 実は「ローカルスコープ」。それ以外は難しくない。 $'' : Regexp.last_match.post_match $+ : Regexp.last_match の最後のもの。 $` : Regexp.last_match.pre_match $~ : Regexp.last_match
parse.y は "Regexp.compile(restr, optstr)" 相当のバイトコードにコンパイルする。optstr は常に付く。