pabloflinstone pabloflinstone - 5 months ago 48
C# Question

How i can get the first match in regex and import this match in a string?

For example using a regex expression del(.*?)del get delcatdel
and save the result in string or in text


in my text (or string) i need obtain delcatdel

USING c sharp

please anybody help me

var regex = new Regex("del(.*?)del");
var match = regex.Match("word1word2delcatdelword3word4deldogdelword5");
string matched = match.Value;