Class: String
Instance Method Summary collapse
-
#show_regexp(regular_expression) ⇒ String
Easy development of regular expressions.
Instance Method Details
#show_regexp(regular_expression) ⇒ String
Easy development of regular expressions.
10 11 12 13 14 15 16 |
# File 'lib/drumherum/regexp.rb', line 10 def show_regexp(regular_expression) if self =~ regular_expression "#{$`}<<#{$&}>>#{$'}" else "no match" end # if end |