I have a string "\"David\"". I want to read David using C# Regex. What I have done is here:
- string strNamePattern = @"^[a-zA-Z][a-zA-Z0-9\ '-]*$";
- Regex re = new Regex(strNamePattern);
- Match match = re.Match(strLastName);
but match.Success does not return true, so I could not get match.Value. I want that if Lastname contains any single or double quotes at starting and ending position, then it must read the substring within that double or single quote

Jignesh KumarRank #91 · 22.9K reputationPosted Apr 28, 2020, 6:36 PM EDT
Arvind KushwahaRank #685 · 3.5K reputationPosted Apr 28, 2020, 3:49 AM EDT
Jignesh KumarRank #91 · 22.9K reputationPosted Apr 28, 2020, 3:39 AM EDT
Azhar Rahi183 reputationPosted Apr 28, 2020, 9:14 AM EDT
Arvind KushwahaRank #685 · 3.5K reputationPosted Apr 28, 2020, 8:37 PM EDT