Displaying page
of
pages;
Items to
Title |
Test
Details
Extract "src" attr from EMBED tag (for Flash)
|
Expression |
(?<=<embed\s[^<>]*?src\s*?=\s*?\x22)[^<>]*?(?=\x22[^<>]*?>)
|
Description |
This pattern will extract the "src" attribute of an EMBED tag. I created it for extracting the URI of an Adobe Flash animation from some HTML, but of course it would work for more general purposes. Don't forget to turn on case insensitivity.
|
Matches |
In <embed src="somefilename.swf" width="550" height="400"> matches "somefilename.swf"
|
Non-Matches |
Doesn't match the surrounding HTML.
|
Author |
Rating:
Not yet rated.
Tim Denby
|
Title |
Test
Details
Extract movie "value" attr from PARAM tag (for Flash)
|
Expression |
(?<=<param(?=[^<>]*?name\s*=\s*\x22movie\x22)[^<>]*?value\s*=\s*\x22)[^<>]*?(?=\x22[^<>]*?>)
|
Description |
This pattern will extract the "value" attribute of a PARAM tag where name="movie". I created it for extracting the URI of an Adobe Flash animation from some HTML, but of course it would work for more general purposes. Don't forget to turn on case insensitivity. Code tidied up with help from Sergei Z. in the forums. Here's an older version, without the nested lookarounds: (?<=<param\s[^>]*?name\s*?=\s*?\x22\s*?movie\s*?\x22[^>]*?value\s*?=\s*?\x22)[^>]*?(?=\x22[^>]*?>)|(?<=<param\s[^>]*?value\s*?=\s*?\x22)[^>]*?(?=\x22[^>]*?name\s*?=\s*?\x22\s*?movie\s*?\x22[^>]*?>)
|
Matches |
In <param name="movie" value="somefilename.swf"> matches "somefilename.swf"
|
Non-Matches |
Doesn't match the surrounding HTML, Doesn't match non-"movie" params, e.g. <param name="song" value="somefilename.mp3">
|
Author |
Rating:
Not yet rated.
Tim Denby
|
Displaying page
of
pages;
Items to