473,771 Members | 2,365 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to remove all format of video file and flash file?

1 New Member
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 ...

Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using System.Net;
  11. using System.IO;
  12. using System.Collections;
  13. using System.Text.RegularExpressions;
  14.  
  15.  
  16. namespace WindowsFormsApplication5
  17. {
  18.     public partial class Form1 : Form
  19.     {
  20.         public Form1()
  21.         {
  22.             InitializeComponent();
  23.         }
  24.  
  25.         private void button1_Click(object sender, EventArgs e)
  26.         {
  27.             WebClient wb = new WebClient();
  28.             string storeDate;
  29.             storeDate = wb.DownloadString(textBox1.Text);               
  30.             MessageBox.Show(storeDate);
  31.             string content = Regex.Replace(storeDate, @"<img\s[^>]*>(?:\s*?</img>)?", string.Empty, RegexOptions.IgnoreCase);
  32.             string pattern = @"<img\s[^>]*>(?:\s*?</img>)?";
  33.             if (Regex.IsMatch(storeDate, pattern))
  34.             MessageBox.Show(" Image Found");
  35.             else
  36.             MessageBox.Show(" Image Not found");
  37.             MessageBox.Show(content);
  38.             string content1 = Regex.Replace(storeDate, @"file=(?<flashurl>http://[^/]+/(.*)flv)", string.Empty, RegexOptions.IgnoreCase);
  39.             string pattern1 = @"file=(?<flashurl>http://[^/]+/(.*)flv)";
  40.             if (Regex.IsMatch(storeDate, pattern1))
  41.                 MessageBox.Show(" Flash file Found");
  42.             else
  43.                 MessageBox.Show("Flash file Not found");
  44.             MessageBox.Show(content1);
  45.             string content2 = Regex.Replace(storeDate, @"[youtube.*[/youtube]", string.Empty, RegexOptions.IgnoreCase);
  46.             string pattern2 = @"[youtube.*[/youtube]";
  47.  
  48.             if (Regex.IsMatch(storeDate, pattern2))
  49.                 MessageBox.Show(" video Found");
  50.             else
  51.                 MessageBox.Show(" video Not found"); 
  52.             MessageBox.Show(content2);
  53.  
  54.         }
  55.  
  56.  
  57.     }
  58.  
  59. }
  60.  
Dec 11 '12 #1
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?
Dec 11 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2020
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?
2
1896
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>
3
3070
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.
3
7829
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!
12
2415
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
1
2403
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...
0
1426
shane3341436
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...
0
1019
YallowPants
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;)
1
2808
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
1
3309
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.,,.........................,
0
9619
marktang
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...
0
9454
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,...
0
10103
jinu1996
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...
1
10038
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,...
0
8934
agi2029
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...
1
7460
isladogs
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...
0
6713
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();...
0
5354
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...
1
4007
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.