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
bita hekmat
NA
8
3.5k
Get All strings between two strings
Jul 25 2015 3:27 PM
I have a string like that :
"reasons why i love you i loveeeeee you very much,i never forget you ";
i want to just keep the string which is between
"i"
and
"you"
.i wrote this code
1- love
2- loveeeeee
3-never forget
i wrote this code ,but that isn't
working properly
//**************
var input = "reasons why i love you i loveeeeee you very much,i never forget you ";
string start = "i";
string end = "you";
var pattern = start + @"\s*(.*?)\s*" + end;
for (int i = 0; i <= Regex.Match(input, pattern).Groups.Count - 1; i++)
{
var result = Regex.Match(input, pattern).Groups[i].Value;
MessageBox.Show(result);
}
//*********
Reply
Answers (
1
)
Application to connect to a mobile from the desktop/Laptop
Remoting