Java tutorial
//package com.java2s; public class Main { /** * It splits the 'data' string until the 'buscar' string is reached * @param data main string to be splitted * @param buscar substring to search in 'data' * @return the substring found in 'data' */ public static String splitFixed(String data, String buscar) { String[] parts = data.split(buscar); parts = parts[2].split("\""); return buscar + "" + parts[0]; } }