I am trying to extract the video id from a youtube url using the following:
val YoutubeRegex = """v=([^&]+)""".r
"v=IQJ13vFYOU8&feature=g-all-lik" match {
case YoutubeRegex(videoId) => videoId
case _ => throw new NoSuchFieldError("impossible to find youtube Id")
}
Saddly this does not work … Any ideas ? Thanks a lot
Isn’t that supposed to be like that?
So you will get
IQJ13vFYOU8part without options.