MODE-2271 Removed use of regex in NameValueFactory to improve performance

After replacing the regular expressions with logic that looks for specific characters patterns,
creating names from strings is just over 50% faster (based upon testing the method 2M times).
Merge pull request #1194 from rhauch/mode-2271

MODE-2271 Removed use of regex in NameValueFactory to improve performance