RubyMine 2017.3 Help

Supporting Regular Expressions in Step Definitions

RubyMine supports regular expressions of Ruby flavor. As such, it uses the Ruby's re module.

When editing source code in a step definition file, note that it is possible to specify data in a step definition as constants, or as regular expressions.

To make RubyMine perceive the entered code as a regular expression, ensure the following line is added to the source code of a step definition:


So doing, the expressions used in step definitions are perceived as regular expressions:

py regexp

If the matcher is not used, then the expressions in quotes are perceived as strings:

py noregex
Last modified: 10 March 2018

See Also