Support regular expressions in step definitions
PyCharm supports regular expressions of Python flavor. As such, it uses the Python'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 PyCharm perceive the entered code as a regular expression, ensure the following line is added to the source code of a step definition:
use_step_matcher("re")
So doing, the expressions used in step definitions are perceived as regular expressions:
![Py regexp Py regexp](https://resources.jetbrains.com/help/img/idea/2023.1/py_regexp.png)
If the matcher is not used, then the expressions in quotes are perceived as strings:
![Py noregex Py noregex](https://resources.jetbrains.com/help/img/idea/2023.1/py_noregex.png)
Last modified: 21 June 2023