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.
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
C
C#
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.