added isRegex assertion

I've made sure to create tests for both simple and more complex regular expressions