How to get regular expression matches between two boundaries

Posted by Rubans on Stack Overflow See other posts from Stack Overflow or by Rubans
Published on 2010-03-08T17:59:13Z Indexed on 2010/03/08 18:06 UTC
Read the original article Hit count: 401

Filed under:
|

Hi, I have the following text:

started: Project: ProjectA, Configuration: Release Any CPU ------

I would like to get just the actual project name which in this example is "ProjectA".

I do have a regular expression "started:(\s)Project:(\s).*," which will give me "started: Project: ProjectA," and then I can use further basic string searching to return the project name but was wondering if there is any way I can just grab the actual project name without doing the extra string searching, maybe using a correct regular expression.

What I need is the string value between boundaries "started: Project: " and ",".
Any ideas?

© Stack Overflow or respective owner

Related posts about c#

Related posts about regex