Now using regular expressions instead of harcoded strings