I\'m new to TDD, and I find RegExp quite a particular case. Is there any special way to unit test them, or may I just treat them as regular functions?
I can't believe no one has posted this amazing tool:
It lets you test your regular expressions. You define some text containing strings it should match, and strings it shouldn't match, and if it's all green, you're good. For example here's one I made to match slugs: http://refiddle.com/by/callum-locke/slug-matcher