Pattern
/(?:youtu\.be\/|v=)([A-Za-z0-9_-]{11})/Sample text
https://youtu.be/dQw4w9WgXcQ https://www.youtube.com/watch?v=dQw4w9WgXcQ https://example.com/v=notyoutubeTest this pattern in the editor
Pull the 11-char id from common YouTube URLs.
/(?:youtu\.be\/|v=)([A-Za-z0-9_-]{11})/https://youtu.be/dQw4w9WgXcQ https://www.youtube.com/watch?v=dQw4w9WgXcQ https://example.com/v=notyoutubeTest this pattern in the editor
Match protocol, host, and optional path/query.
Simple FQDN matcher for hostnames in prose.
3–16 chars: letter start, then letters, digits, underscore.
kebab-case slugs for routes and CMS paths.
Extract key=value pairs from a query string.
Opening, closing, and self-closing tags (naive).