hi,
I am creating small application using c#.net.I removed all image tag using regular expression no I want to remove all video file and flash file also in source code of webpage.
so far I have tried this ... - using System;
-
using System.Collections.Generic;
-
using System.ComponentModel;
-
using System.Data;
-
using System.Drawing;
-
using System.Linq;
-
using System.Text;
-
using System.Threading.Tasks;
-
using System.Windows.Forms;
-
using System.Net;
-
using System.IO;
-
using System.Collections;
-
using System.Text.RegularExpressions;
-
-
-
namespace WindowsFormsApplication5
-
{
-
public partial class Form1 : Form
-
{
-
public Form1()
-
{
-
InitializeComponent();
-
}
-
-
private void button1_Click(object sender, EventArgs e)
-
{
-
WebClient wb = new WebClient();
-
string storeDate;
-
storeDate = wb.DownloadString(textBox1.Text);
-
MessageBox.Show(storeDate);
-
string content = Regex.Replace(storeDate, @"<img\s[^>]*>(?:\s*?</img>)?", string.Empty, RegexOptions.IgnoreCase);
-
string pattern = @"<img\s[^>]*>(?:\s*?</img>)?";
-
if (Regex.IsMatch(storeDate, pattern))
-
MessageBox.Show(" Image Found");
-
else
-
MessageBox.Show(" Image Not found");
-
MessageBox.Show(content);
-
string content1 = Regex.Replace(storeDate, @"file=(?<flashurl>http://[^/]+/(.*)flv)", string.Empty, RegexOptions.IgnoreCase);
-
string pattern1 = @"file=(?<flashurl>http://[^/]+/(.*)flv)";
-
if (Regex.IsMatch(storeDate, pattern1))
-
MessageBox.Show(" Flash file Found");
-
else
-
MessageBox.Show("Flash file Not found");
-
MessageBox.Show(content1);
-
string content2 = Regex.Replace(storeDate, @"[youtube.*[/youtube]", string.Empty, RegexOptions.IgnoreCase);
-
string pattern2 = @"[youtube.*[/youtube]";
-
-
if (Regex.IsMatch(storeDate, pattern2))
-
MessageBox.Show(" video Found");
-
else
-
MessageBox.Show(" video Not found");
-
MessageBox.Show(content2);
-
-
}
-
-
-
}
-
-
}
-
1 2079 Rabbit 12,516
Recognized Expert Moderator MVP
So what problem are you having? Are you getting errors? What are they? Is it not doing what you want? What is it doing instead?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Juggernath |
last post by:
I have upload form for uploading swf file and then I should get true
dimensions of that flash. Any ideas how to do it?
|
by: Bob |
last post by:
How do I access a flash file in my .net web pages.
I have worked with image files with no problem such as:
in my header.ascx program, I have a:
<IMG src= "images/header_gold2.jpg">
Then, in my appform.aspx program, I have a:
<% Register Tag Prefix="uc1" src="header.ascx" %> and then after <HTML>:
<uc1:header id="header1" align="center" runat="server"></uc1:header>
|
by: sureshsundar007 |
last post by:
Hi all,
I want to know how to read the Flash file (.SWF) information using
C#.
Any help is greatly appreciated.
Thanks,
Suresh.
|
by: yxq |
last post by:
Hello,
I use the com component "shockwave flash object" to play flash file, but how
to get the actual size (width*height) of flash file but no control size?
thank you!
|
by: Sandman |
last post by:
There are some Mac tools to convert pretty much any given video source
to a Flash video file (.flv) but I'm wondering if there is any way to
do it using a Linux platform tying in to a PHP web system? I.e. I'd
like to have video files submitted by users which are then
auto-converted to .flv files.
Anyone have any experience with this?
--
Sandman
| |
by: patronise |
last post by:
My problem is that I'm wrestling to make the LoadMovie and UnloadMovie functions work for me. Here is the layout of my flash file: I've got several seperate flash files and I can jump to any one of them by pressing a specific key to load another flash file. Here is the code I'm using for this bit:
Now when the next flash file is loaded, I use this bit of code to get rid of the previous flash file.
Now this does work in getting...
|
by: shane3341436 |
last post by:
Hello to all
I have a very strange problem while loading swf flash file in my php page. The swf file loads well under localhost and IE7 browser. But when viewed using IE6 or mozilla only the first frame of the swf file is loaded. Other frames are not loaded forever. I even exported the swf file to flash7 compatible format, but it does not working too. Is it just the problem of local server of bandwidth of the network? Do you have any idea about...
|
by: YallowPants |
last post by:
hi all
i found good prog for converting all video (avi, mpg, mpeg, wmv, mov, asf, mp4, etc.) formats into flash(swf,flv) its FlashConv!
this is very simple tool for making high-quality flash file!
advice you to try!
you can find more info and download demo without timelimit for free here
if you have questions i would like to help!
PS:waiting replys with your questions and opinions;)
|
by: David Buckley |
last post by:
Does anyone have any example code of converting any type of video to flash
video at all using asp.net 2.0 c# web applications. God Bless
|
by: premMS143 |
last post by:
Hi everybody,
I've created a VB form which display a menu showing different contents.
Clicking on any content should display a file which is in flash (.swf) format. But I don't have an idea about this.
WHich container I insert iin VB form to play this flash file within VB application.
What code to write to play .swf file properly.
Could anybody help me for this ..
Please.,,.........................,
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |