Hi all
i am wondering if anyone could help me out.
Im trying to detect if an image or media file (wmv,wma,mpeg etc) has been placed in the text editor.
Basically i have an approval system that allows a user if they just use plain text to have there content approved by the system straight away, but if they insert a Hyperlink, Image, media file then it puts there submission into the approval table in an sql database.
So far i have an regular expression for detecting Hyperlinks which works but im having problems getting something to work for an image and a media file any help would be great
Here is the regular expression for the URL Detecter
Dim URLMatch As Match = Regex.Match(Editor1.Text, "(?<http>(http:[/][/]|www.)([a-z]|[A-Z]|[0-9]|[/.]|
)*)")
I have tryed the following Regular expressions for the image files and none of them work if anyone could help would be great or they have another solution that would be great.
Dim imgMatch As Match = Regex.Match(Editor1.Text, "<img src="abc.jpg">|||<img src="abc.jpg"/>|||<ImG src="abc.jpg")
Dim imgMatch As Match = Regex.Match(Editor1.Text, "<(\/{0,1})img(.*?)(\/{0,1})\>")
Dim imgMatch As Match = Regex.Match(Editor1.Text, "<img src="immy.jpg" alt="Image">|||<img src="immy.jpg"alt=&q")
Dim imgMatch As Match = Regex.Match(Editor1.Text, "<[iI][mM][gG]([^>]*[^/>]*[/>]*[>])")
Regards
Matt
Hope this makes sense