Regex for a simple sentence.
Posted on 2007-04-08
I've got the sentence "A duck is a bird" and I want to create a regular expression that will detect it from something like this:
^(A )[a-zA-Z0-9]\s\w(is a)[a-zA-Z0-9]$
So that should also work for the sentence "A kitten is a cat". However, my regex doesn't work, where have I gone wrong?