Defining Regex in C#

<>

This question already has an answer here:

Answers


As stated in the comments, nothing good ever comes from using regex on HTML. However, if - and only if - the markup is as simple as in your example, you could probably get away with something like this:

    @"<span class=""author"">(?<author>[^<]+)</span>" 

The authors name could be retrieved from match.Groups["author"].Value


Need Your Help

asp.net user control event propagation trouble

c# asp.net events user-controls

I have a simple user control that contains some buttons that fire events which I want to be handled by the page using the control. I have my code setup as such:

Asp.net mvc - trying to display images pulled from db \

c# sql sql-server asp.net-mvc

//Inherits="System.Web.Mvc.ViewPage&lt;FilmFestWeb.Models.ListVideosViewModel&gt;"