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
David Smith
NA
2k
0
Regex help
Oct 25 2010 1:45 AM
Ok I looking for events that begin 1 - d, and then i also want to look for words also like apple, oranges etc.........
I want to find rows where the string begin with 1 through D, then I also want to find rows that contain the four words below in red
Regex r = new Regex("^[123456789ABCD]^[
Apple
]^[
Oranges
]^[
Green
]^[
blue
]");
this is the linq im doing so far
Regex r = new Regex("^[123456789ABCD]^[
Apple
]^[
Oranges
]^[
Green
]^[
blue
]");
var items= (from x in List.Events
where r.IsMatch(x.Code)
select new
{
Code= x.Code,
Data= x.Data
}).ToList();
the linq below works without the 4 red words above, but how to add the words to the regex,
Regex r = new Regex("^[123456789ABCD]");
var items= (from x in List.Events
where r.IsMatch(x.Code)
select new
{
Code= x.Code,
Data= x.Data
}).ToList();
Reply
Answers (
1
)
Asynchronous Process Issu
how to save content in notpad a website by asp .net