Steve Fenton


You can subscribe to the regex tag micro-feed.

Useful SpecFlow regular expressions

Here are some useful regular expressions that can improve your SpecFlow step definitions. All of the examples are ready to drop-in to a  C# string, so they are pre-escaped for your pleasure (for example, the useful RegEx ([^\”]*) is listed as “”([^\””]*)”” so you can use it in a definition like this: [Given(@”this line accepts […]

Overloaded steps in SpecFlow

This can be a pretty common situation in SpecFlow, thanks to the trusty default RegEx that SpecFlow uses: Scenario: Binding Test Given I have defined a step for the second line of this specification, but not the third And this line accepts “a string” in And this line accepts “a string” in and “another string” […]