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
kannan
NA
1
1.3k
Need regex code to replace a particular variable name in an expression by some value.
Aug 11 2012 1:16 PM
A variable name can contain the characters [a-zA-Z0-9_]
I want to replace all occurences of a particular variable name in an expression by some value.
For example if the expression is a+aa-b and I want to replace the variable "a" by 1. The variable "aa" should not get replaced.
The regex has to remember the unmatched portions, so that they can be copied over in the final expression. I need to get this done as part of a bigger project and don't have the time to read up in depth about regex. Please help.
Reply
Answers (
1
)
Formatting cells in excel when exporting data to excel
C# Scope Identity