Is Regex overkill for ~2000 strings and a few conditions?
Goal: My input is a list of usernames returned from an API that only contain alphanumerics and underscores. Conditionally I'd like to only break the string apart only the first time any of these conditions are met:
1. Encounter a literal "_"
2. Encounter an upper case after a lower case
3. Encounter an upper case after an upper case.
Is Regex kinda overkill or simply not the "right" tool for this or am I in the right ballpark? I figure I could also use string.Replace or break the strings down and do Char comparisons then compare the results.
3 Replies
regex seems like the perfect tool for this job
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Cool, thanks you two.