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
Sumair Sheikh
NA
4
3.9k
Regex replace firs and last charactr of any word HELP
Sep 9 2011 8:11 AM
want to remove first and last character of any word by using regex.... FOr example..
(HELLO) (WORLD) will return === HELLO WORLD
and (HE/LLO) (WO/RLD) will return ====== HE/LLO WO/RLD
or //Hello WOrld/ will return ========= Hello WOrld
or (HELLO) (W/ORLD) STACKOVERFLOW) will return === HELLO W/ORLD STACKOVERFLOW
(He(Lo) Wo(R)ld will return ===== He(Lo Wo(R)ld
I dun want to replace all parenthesis ..I wish to replace First and last parenthesis of any word.....
I m trying this ...
temp = Regex.Replace(temp, @"^[!@#$%^&*()_+=[{]};:<>|./?,\'""-]+", " ");
BUT this regex equation ONly remove FIRSt CHaracter IF FOund....
Reply
Answers (
1
)
i want close the top most form property is ture in vb.net coding at runtime.
C sharp regex replace first and last char of any word