Regular Expression |
[eluser]nirbhab[/eluser]
Quote:<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/SZPz8gaFaEE&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/SZPz8gaFaEE&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object> Guys how to find the bold string from the above string Hope you have got my idea. I want add the youtube videos in my site, added as user videos..some what like orkut does. I am going to extract the source of flash file, and save in DB_table with user_id(logged in user). If my plan is wrong please suggest a better way.
[eluser]nirbhab[/eluser]
Its not working..returning a empty array() Code: $pattern = '/<embed[^>]+src[\\s=\'"]';
[eluser]Pascal Kriete[/eluser]
xwero has it right, but regular expression tester reveals that your snippet has funny quotes. So a cheap hack would be: Code: $patthern = '/src=[^a](.+?)[^a] type/'; |
Welcome Guest, Not a member yet? Register Sign In |