So far I got this Regular expression
working for the examples I posted, and it gets the ID on the first group:
http(?:s?):\/\/(?:www\.)?youtu(?:be\.com\/watch\?v=|\.be\/)([\w\-\_]*)(&(amp;)?[\w\?=]*)?
More Related Contents:
- Regex for youtube URL
- string pattern matching using perl regex [closed]
- Why is this regex allowing a caret?
- Regex: ignore case sensitivity
- How can we match a^n b^n?
- Decimal or numeric values in regular expression validation
- Carets in Regular Expressions
- What is the ultimate postal code and zip regex?
- How do you debug a regex? [closed]
- (grep) Regex to match non-ASCII characters?
- Negating a backreference in Regular Expressions
- Regex to split HTML tags
- What’s the technical reason for “lookbehind assertion MUST be fixed length” in regex?
- Remove all text between two brackets
- Regular expression – starting and ending with a character string
- To use or not to use regular expressions?
- Simple AlphaNumeric Regex (single spacing) without Catastrophic Backtracking
- Multiple regex matches in Google Sheets formula
- Regex to match any character including new lines
- Regex: How to match a string that is not only numbers
- How do I get regex support in Excel via a function, or custom function?
- Regular Expression Word Boundary and Special Characters
- How to search and replace with a counter-based expression in Vim?
- Combining $regex and $or operators in Mongo
- Why does VIM have its own regex syntax?
- Regex Letters, Numbers, Dashes, and Underscores
- How to replace only part of found text?
- Can I use an OR in regex without capturing what’s enclosed?
- How to make “grep” read patterns from a file?
- How to measure similarity between strings?