i’m using the default “insert video” function from wordpress (which inserts a normal hyperlink to the video only) and would like to replace that link with something else like a video player.
my question:
what’s the regex pattern for grabbing all links inside a post?
thx
I’ll answer your question below, but have you looked at using embeds? Look here for more information: http://codex.wordpress.org/Embeds
The simplest regex for this would look something like
http://.*b
Here’s an example of it in action:
Where the file I reference looks like this:
and the return looks like this: