Don’t you hate the ugly code generated to embed a video? Couldn’t there be a better way? The short answer is yes.
Allow your CMS ’ users and clients to embed videos the clean, quick and effortless way. Just tell them to copy the URL and surround it by curly braces just like this
{{ http://www.youtube.com/watch?v=kzdykNa2IBU }}
In this tutorial I’ll teach you how to process this data with preg_replace_callback() and some regex magic.