Given the following example strings
//www.youtube.com/embed/OYb_N_XEYas?rel=0&showinfo=0
//www.youtube.com/embed/STH9ZpeFH2o
I need to capture the sub-string after 'embed/' up to either the end of the string or either a '?' or '/' character.
How do I specify the optional second non-capturing group?
using (embed\/)(.*)
works for the second string, and (embed\/)(.*)(\?|\/)
works for the first, but neither works in both cases.