Ruby Regexp methods?
Posted
by fjs6
on Stack Overflow
See other posts from Stack Overflow
or by fjs6
Published on 2010-03-26T00:24:50Z
Indexed on
2010/03/26
0:43 UTC
Read the original article
Hit count: 211
Is there a gem/example_code that allows to work with regexps?
I am not looking for what a regexp can do, but what can be done to a Regexp object.
For example:
r = Regexp.new(...)
r.min_length => the minimum length of a matching string
r = Regexp.new("car(less)?")
r.min_length => 3 for the string "car"
Thanks!
© Stack Overflow or respective owner