import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Example {
public static void main(String[] args) {
final String regex = "Stuff ";
final String string = "\"video_title\":\"Chubby soccer mom sucking my cock during her sons game\",\"defaultQuality\":[480,240,720,1080],\"vcServerUrl\":\"/svvt/add?stype=svv&svalue=144220772&snonce=ecjcjh6urryiu3oz&skey=d1d1f93a1d36b34372e7ec1e7573a0a93408ca24d85020acf76bb670315908a0&stime=1533904116\",\"mediaDefinitions\":[{\"defaultQuality\":false,\"format\":\"\",\"quality\":\"720\",\"videoUrl\":\"https:\\/\\/dm.phncdn.com\\/videos\\/201712\\/06\\/144220772\\/720P_1500K_144220772.mp4?ttl=1533907590&ri=1024000&rs=832&hash=4e134e89b30b666914112869908c3b73\"},{\"defaultQuality\":true,\"format\":\"\",\"quality\":\"480\",\"videoUrl\":\"https:\\/\\/dm.phncdn.com\\/videos\\/201712\\/06\\/144220772\\/480P_600K_144220772.mp4?ttl=1533907590&ri=1024000&rs=632&hash=9d42c16aac1c7a55b77a24a6fc4f9358\"},{\"defaultQuality\":false,\"format\":\"\",\"quality\":\"240\",\"videoUrl\":\"https:\\/\\/dm.phncdn.com\\/videos\\/201712\\/06\\/144220772\\/240P_400K_144220772.mp4?ttl=1533907590&ri=1024000&rs=368&hash=aebcfab4acd30f62c9a807c74791c18b\n";
final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE);
final Matcher matcher = pattern.matcher(string);
while (matcher.find()) {
System.out.println("Full match: " + matcher.group(0));
for (int i = 1; i <= matcher.groupCount(); i++) {
System.out.println("Group " + i + ": " + matcher.group(i));
}
}
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Java, please visit: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html