verbal_expressions
verbal_expressions copied to clipboard
Added start/end of string, "hex", modifiers
0.1.5 --> 0.1.6:
- Added "hex" ([a-fA-F0-9]), "start_of_string" (\A), "end_of_string" (\z).
- Changed the way start/end of line are implemented slightly, as I think they were wrong/bug-prone. (See the related issue I raised.)
This make version 0.1.6 slightly incompatible with the previous, but the change (which only affects weird uses of
start/end_of_line
, and some uses foralternatively
) is unlikely to even be noticed.
0.1.6 --> 0.2.0
-
Added modifiers. I.e. ignorecase and multiline. These can be passed in as parameters with the VerEx constructor, e.g.
VerEx.new(:ignorecase) do .....
. This is also a slight bug fix, sinceVerEx.new
was creating case insensitive regular expressions by default. From the ruby docs:If options is a Fixnum, it should be one or more of the constants Regexp::EXTENDED, Regexp::IGNORECASE, and Regexp::MULTILINE, or-ed together. Otherwise, if options is not nil or false, the regexp will be case insensitive.
Previously, modifiers was being defaulted to an empty string, not nil or false.
0.2.0 --> 0.2.1
- Added :whole_line and :whole_string arguments which the VerEx can be initialised with. This is effectively just a shorthand for writing start/end_of_line/string in the VerEx block.
P.s. I didn't want to re-generate the gemspec myself as I'm submitting this on a Windows machine which has all different versions of things installed.