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
Sebastian Banz
NA
8
0
Problem with Regular Expression
Mar 23 2006 9:03 AM
Hi,
I've got a Problem with dividing a string. Evertytime a "+" appears in the string, i want to split the string. That's not difficult:
RegEx rp =
new
Regex(@"\+");
string
[] parameters = rp.Split(input_string);
My problem ist, that if a "?" preceds "+", I don't want to divide the string. So I would write:
RegEx rp =
new
Regex(@"[^\?]\+");
The result is, that the programm removes the preceding character of ever simple "+".
Example:
Hello?+You --> Hello?+You
Hello+You --> Hell
You
^^the o is missing!!!
Is there a way to tell te Reqular Expression not to remove the preceding symbol?
Thanks for your help!
Reply
Answers (
0
)
PDA Name
Timer in C# CF