using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"^[^\S\r\n]+artist:[^\S\r\n]*(.*)";
string input = @"mp3 @ 0x75b225b8]Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: audio (mp3), -aid 0
[lavf] stream 1: video (mjpeg), -vid 0,
Clip info:
Release date: Songspk.LINK
album_artist: Various Artists
album: Kapoor & Sons (Since 1921)
artist: Tanishk Bagchi, Arijit Singh & Asees Kaur
composer: Amaal Mallik | Songspk.LINK
disc: 1/1
encoded_by: Lame
genre: Bollywood Music
title: Bolna - Songspk.LINK
track: 1/1
EpisodeID: Songspk.LINK
copyright: Songspk.LINK
TOPE: Amaal Mallik | Songspk.LINK
TIT1: Songspk.LINK
TIT3: Songspk.LINK";
RegexOptions options = RegexOptions.Multiline;
Match m = Regex.Match(input, pattern, options);
Console.WriteLine("'{0}' found at index {1}", m.Value, m.Index);
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx