mattn / mruby-onig-regexp

mrbgem of 鬼雲's Regular Expression
31 stars 34 forks source link

Support `Regexp#match?` #81

Closed take-cheeze closed 6 years ago

take-cheeze commented 6 years ago

https://github.com/mruby/mruby/issues/3968

mattn commented 6 years ago

Is this you want? https://github.com/mattn/mruby-onig-regexp/blob/71f0ff7c0dad04cc041bd650a6b29946b11d3dba/src/mruby_onig_regexp.c#L1101

mattn commented 6 years ago

Ah, ?. Currently not supported.

take-cheeze commented 6 years ago

Seems like String#match? exists too. It's more lighter because it doesn't need to create MatchData object.

mattn commented 6 years ago

Yes, but must not update variables that have prefix $.

mattn commented 6 years ago

closed by https://github.com/mattn/mruby-onig-regexp/pull/82

proyb6 commented 6 years ago

This additional mean match or match?

mattn commented 6 years ago

This is match?

proyb6 commented 6 years ago

Appreciate! Do you have a benchmark comparing =~ match and match?