using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"[^\/]*";
string input = @"3682/miniperfume-candy.jpg
3681/miniperfume-candy.jpg
4252/parfem-acqua-woman.jpg
4253/parfem-acqua-woman.jpg
3658/miniperfume-acqua-woman.jpg
3659/miniperfume-acqua-woman.jpg
3798/50ml-adriana.jpg
2103/miniparfemy-adriana.jpg
2104/miniparfemy-adriana.jpg
4254/parfem-adriana.jpg
4255/parfem-adriana.jpg
3800/50ml-adriana-rose.jpg
3801/50ml-adriana-rose.jpg
4256/adriana-rose.jpg
4258/adriana-rose.jpg";
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