using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"<img[^>]*(?=\""https?:\/\/(www\.)?urpgstatic\.com)\""([^\""]*)\""[^>]*>";
string input = @"<img src=""https://www.pokeyplay.com/imagenes/backend/publicidad.gif"" alt=""Publicidad"" align=""left"" />
<img src=""https://www.pokeyplay.com/imagenes/backend/spacer.gif"" alt=""sp"" />
<img src=""imagenes/backend/etiqueta-pyp-pokedex.gif"" alt=""P&P PokéDex"" width=""184"" height=""100"" />
<img src=""imagenes/backend/spacer.gif"" alt=""sp"" />
<img src=""http://urpgstatic.com/img_library/pokemon_sprites/187.png"" style=""vertical-align:middle"" />
<img src=""https://urpgstatic.com/images/pokemon-home.png"" alt=""UnovaRPG (formerly Pokémon Indigo) - Online Pokemon Game"" width=""250"" height=""272"">";
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(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