I have a list of words that need to be made human readable, such as FirstName to First Name, LastName to Last Name, and in some cases, acronyms like ARBs to remain as is. The latter was recently introduced and has caused a display issue since our regular expression returns AR Bs. Here's what we have, which I know is insufficient for acronyms:
([A-Z][a-z]+)
I've found other expressions on SO and on other sites that are able to work with acronyms, however they work on strings where the acronym is within the string rather than being the entire string. I can do simple regular expressions, but this is too tricky for my skills. I would provide other examples for testing if I had them, but all of the strings work fine except the new one, ARBs. Thank you.
Update: Here's the code usage
string friendlyName = Regex.Replace(field.Name, "([A-Z][a-z]+)", " $1", RegexOptions.Compiled).Trim();
ConfigureIDEAsUser
split to "Configure IDE as user" or "Configure IDEAs user" ? – Ikeda