How to match youtube links?
Matching youtube urls and their IDs
Everything you need to know about writing regular expressions for PHP.
The following regex will help you match anchor tags in HTML. It will capture the
href value in capture group 1 and the link’s text in capture group 2.