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
Ekona Pikin
NA
38
13.2k
Trim a string after a spoecial character
Feb 23 2015 2:54 PM
What is the best way to use regex and remove everything after (":") using c#
I have a richtextbox and its populated with data that I load .
The data contain bunch of itemcodes some have (colon) and alphanumeric characters I dont need like for instance RE45O7:TAKEMOUT==> I just want to be able to have RE4507
This is what I have but is not working...
string str = rchTxtContent.Text;
string ext = str.Substring(str.LastIndexOf(":") + 1);
Reply
Answers (
3
)
Suggest some deliberate practice to improve c# experience
help me in exercise