Method: Polars::StringExpr#count_matches
- Defined in:
- lib/polars/string_expr.rb
#count_matches(pattern, literal: false) ⇒ Expr
Count all successive non-overlapping regex matches.
1220 1221 1222 1223 |
# File 'lib/polars/string_expr.rb', line 1220 def count_matches(pattern, literal: false) pattern = Utils.parse_into_expression(pattern, str_as_lit: true) Utils.wrap_expr(_rbexpr.str_count_matches(pattern, literal)) end |