My name is Edward Tanguay. I'm an American software and web developer living and working in Berlin, Germany.
C# CODE EXAMPLE created on Tuesday, July 06, 2010 permalink
How to stop regular expression greediness
This example shows how you can tell a regular expression to only get the text before the first colon, thanks Matthew and Jason.
using System;
using System.Text.RegularExpressions;

namespace TestRegex92343
{
    class Program
    {
        static void Main(string[] args)
        {

            //Regex regex = new Regex(@"(?<label>.+):s*(?<text>.+)"); //wont' work in second case

            {
                string line = "title: The Way We Were";
                Regex regex = new Regex(@"(?<label>[^:]+):s*(?<text>.+)");
                Match match = regex.Match(line);
                Console.WriteLine("LABEL IS: {0}", match.Groups["label"]);
                Console.WriteLine("TEXT IS: {0}", match.Groups["text"]);
            }

            {
                string line = "title: The Way We Were: A Study of Youth";
                Regex regex = new Regex(@"(?<label>[^:]+):s*(?<text>.+)");
                Match match = regex.Match(line);
                Console.WriteLine("LABEL IS: {0}", match.Groups["label"]);
                Console.WriteLine("TEXT IS: {0}", match.Groups["text"]);
            }

            Console.ReadLine();

        }
    }
}

need markup?