HEXAQ : A friendly question - answer site for IT professionals

How to find string between starting and ending words?


hello everyone,

I am Jeff. I develop websites in ASP.NET. I currently use ASP.NET 4.0.

My client has one picky requirement. The guy wants to find out any string in given paragraph if it is between starting and ending words.

The meaning he wants to have s substring from source string with matching criteria.

Here is an example for you guys:

Source Data

To maintain a high quality content, moderators may remove messages or idea which stray from the topic or do not contribute new ideas.


Find out the string between maintain and moderators

Expected Output

a high quality content,

If one or both word out of starting and ending word not found in the source string, result should be blank ("") i.e. string.empty.

Please provide some lines of code so I can finish it.


≡ Total 0 Answer

Enter your reply here
Answer Preview: