using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"data-src-l=""(.*)""";
string input = @"<div id=""ProductImages"" class=""noscript"">
<ul>
<li>
<a href=""/WebRoot/products/8020/80203122/bilder/80203122.jpg"">
<img itemprop=""image"" alt=""Jesus Remember Me - Taize Songs (2CD)""
src=""/WebRoot/AsaphNL/Shops/asaphnl/5422/8F43/62EE/
D698/EF8E/4DEB/AED5/3B0E/80203122_xs.jpg""
data-src-xs=""/WebRoot/AsaphNL/Shops/asaphnl/5422/8F43/62EE/
D698/EF8E/4DEB/AED5/3B0E/80203122_xs.jpg""
data-src-s=""/WebRoot/products/8020/80203122/bilder/80203122_s.jpg""
data-src-m=""/WebRoot/products/8020/80203122/bilder/80203122_m.jpg""
data-src-l=""/WebRoot/products/8020/80203122/bilder/80203122.jpg""
/>
</a>
</li>
</ul>
</div>";
Match m = Regex.Match(input, pattern);
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