Regex addition and Bug Fixing