How to let regex know that it should stop after a first occurence?

Posted by Bas on Stack Overflow See other posts from Stack Overflow or by Bas
Published on 2010-05-20T13:52:54Z Indexed on 2010/05/20 14:00 UTC
Read the original article Hit count: 167

Filed under:
|
string time = "Job started: donderdag 6 mei 2010 at 20:00:02"
var filterReg = new Regex(@".*:", RegexOptions.Compiled);
time = filterReg.Replace(time, String.Empty);

Is it possible to stop after the first occurence? so at the first ":".

© Stack Overflow or respective owner

Related posts about regex

Related posts about c#