How do I create groups with names in C# using Regular expressions, and is it good practice?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Give the group a tag name:
I absolutely think this is good practice. Consider what happens when you change the regular expression. If you use indexes to pull data out, then the order of these groups could change. By naming them, you are specifying exactly the data that you think the group contains, so it’s a form of self-documentation too.