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
Tony Serva
NA
11
0
RegEx to get only page name from URL
Sep 23 2008 1:27 PM
Hi, Can anyone help me to understand how to take:,
http://www.mywebsite.com/news/local_news/Bullet-riddled_body_found_on_North_Side.html
And strip off everything before the last "/"
to result in:
Bullet-riddled_body_found_on_North_Side.html
The replace on the ".html" is something I know how to do and I think i need to use:
Regex RE = new
Regex("/",RegexOptions.RightToLeft);
Match theMatch = RE.Match(URL);
But his only returns the character "/".
How do you say delete everything before the first instance of the "/" character looking left to Right?
Thanks in advance.
Reply
Answers (
9
)
Rectangle drawing
Does not exist in current context error