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 always test them just as I do any other function. Make sure they match things you think they should match and that they don't match things they shouldn't.