TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Azhar Rahi
NA
191
0
Get a substring from a qutoed string using C# regex
Apr 28 2020 7:16 AM
Hi
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
Reply
Answers (
5
)
c# Page numbering
Document management system file type C#