Meetup #72
RubyGemsとBundlerへの対応作業
正規表現ライブラリをfancy-regexからOnigmoへ変更
fancy-regex https://github.com/fancy-regex/fancy-regex
Rustの正規表現ライブラリ regex を機能拡張したもの
regex crateはRE2ベースで look-around と backreference をサポートしていない
計算量爆発を防ぐため
https://swtch.com/~rsc/regexp/
Rubyの正規表現との非互換
\Z
\123
Onigmo https://github.com/k-takata/Onigmo
鬼車 https://github.com/kkos/oniguruma のフォーク
多機能正規表現ライブラリ 多数の文字コードに対応
2025/4に開発停止
Rustバインディングあり https://github.com/rust-onig/rust-onig
Onigurumaは Ruby 専用っぽい位置づけ
Rustでバインディングを書いた https://github.com/sisshiki1969/onigmo-regex
OnigmoとRubyにも非互換が…
RubyではCapture groupの名前に記号を使える i.e. Foo::Bar
フラグで解決
その他
[ a:2, b:5 ]
code:ruby
=begin
the everything between a line beginning with `=begin' and
that with `=end' will be skipped by the interpreter.
=end
v = "c d"
%W(a\ b #{v}e\sf #{}) # => "a b", "c de f", ""