/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
final String regex
= "v=([^\\s&]*)"; final String string
= " https://m...content-available-to-author-only...e.com/watch?v=9tg3csrFVJw"; final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE);
final Matcher matcher = pattern.matcher(string);
if(matcher.find()) {
System.
out.
println(matcher.
group(1)); }
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwucmVnZXguTWF0Y2hlcjsKaW1wb3J0IGphdmEudXRpbC5yZWdleC5QYXR0ZXJuOwoKLyogTmFtZSBvZiB0aGUgY2xhc3MgaGFzIHRvIGJlICJNYWluIiBvbmx5IGlmIHRoZSBjbGFzcyBpcyBwdWJsaWMuICovCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKICAgICAgICBmaW5hbCBTdHJpbmcgcmVnZXggPSAidj0oW15cXHMmXSopIjsKICAgICAgICBmaW5hbCBTdHJpbmcgc3RyaW5nID0gIiBodHRwczovL20uLi5jb250ZW50LWF2YWlsYWJsZS10by1hdXRob3Itb25seS4uLmUuY29tL3dhdGNoP3Y9OXRnM2NzckZWSnciOwogICAgICAgIGZpbmFsIFBhdHRlcm4gcGF0dGVybiA9IFBhdHRlcm4uY29tcGlsZShyZWdleCwgUGF0dGVybi5NVUxUSUxJTkUpOwogICAgICAgIGZpbmFsIE1hdGNoZXIgbWF0Y2hlciA9IHBhdHRlcm4ubWF0Y2hlcihzdHJpbmcpOwoKICAgICAgICBpZihtYXRjaGVyLmZpbmQoKSkgewogICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4obWF0Y2hlci5ncm91cCgxKSk7CiAgICAgICAgfQkJCgl9Cn0=