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).