Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Php regex detecting flash object tags

Status
Not open for further replies.

s0crates9

Technical User
Jun 18, 2005
70
US
Hello eveyone. I am not really that good at regexes and I have been working on oe to identify Flash <object> tags and I am not having any success. Can anyone help me out?

Here is the code I have set up to detect the tags:
Code:
if (preg_match("/\<object[0-9a-z\_\?\*\=\"\:\-\/\.\#\,\<\>\'\"\n\r\t\s]+\>.*\<\/object\>/smUi",$array[$i], $tag_contents))

Thanks in advance!

Web site design, internet marketing, SEO and business solutions company.
 
I've experimented with throwing the page code off of that URL (which has flash on it) and no code for flash or the object tag shows up. I suspect I may need to convert he code to pure HTML markup first before runing a regular expression. Does anyone know how to effectively do this?

Web site design, internet marketing, SEO and business solutions company.
 
What I have figured out thusfar is that although the flash code exists when doing a search in notepad for the <object tag, it does not show up in the array pulled from file($url), thus it doesn't match the Regex that I created (which has undergone multiple edits and tests).

I do need help turning the HTML code into pure HTML TEXT in order to match a regex pattern to it.

Web site design, internet marketing, SEO and business solutions company.
 
could you post an example of received input and desired output?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top