olegpidsadnyi/pytest-bdd — pull request #21 by curzona (2013-09-15 07:44:54+00:00)
Title: Added support for defining step definitions with regular expressions.

Added support for defining step definitions with regular expressions.

See [Step Definitions](http://cukes.info/step-definitions.html) for Cucumber (Pythonified):

```
Scenario: Some cukes
Given I have 48 cukes in my belly
```
The I have 48 cukes in my belly part of the step (the text following the Given keyword) will match the Step Definition below.

```
@Given("I have (?P\d+) cukes in my belly")
def I_have_cukes_in_my_belly(cukes):
// Do something with the cukes
```

Note: I've required regex step definitions to use named capture groups for function arguments. Unnamed capture groups will not be passed to the step function.