March 2020
Intermediate to advanced
608 pages
17h 17m
English
Imagine that you are developing a blog overview page, and, for each post, you want to show images, music, or videos on that page, taken from the content. In such a case, you need to extract the <figure>, <img>, <object>, <embed>, <video>, <audio>, and <iframe> tags from the HTML content of the post, as stored on a field of the post model. In this recipe, we will see how to perform this using regular expressions in the first_media filter.