Updating code to use regex instead of if statements
Merge pull request #1 from nadams810/master

Updating code to use regex instead of if statements