Scala regex youtube video id -


i trying extract video id youtube url using following:

val youtuberegex = """v=([^&]+)""".r    "v=iqj13vfyou8&feature=g-all-lik" match {     case youtuberegex(videoid) => videoid     case _ => throw new nosuchfielderror("impossible find youtube id")   } 

saddly not work ... ideas ? lot

isn't supposed that?

val youtuberegex = """v=([^&]+).*""".r // need specify there remainder  "v=iqj13vfyou8&feature=g-all-lik" match {   case youtuberegex(videoid) => videoid   case _ => throw new nosuchfielderror("impossible find youtube id") } 

so iqj13vfyou8 part without options.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - EclipseLink JPA Object is not a known entity type -

java - Need to add SOAP security token -