EjecucionPrueba.java 1.31 KB
Newer Older
Felipe Escala Torres committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

import java.io.PrintWriter;
import org.json.simple.JSONObject;
import pe.siso.academia.Services.PensionService;
import pe.siso.academia.Servlets.ServletAula;
import pe.siso.academia.Servlets.ServletPension;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author sistem05user
 */
public class EjecucionPrueba {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
//        int codPension = 75738;
//        PensionService servicio = new PensionService();
//        JSONObject resultado = servicio.ComprobanteElectronico(codPension);
//        System.out.println("RESULTADO JSON --->" + resultado);

        String texto = "Número correlativo Correlativo fuera del rango permitido,"
                + " el último número registrado en NubeFacT para este documento y"
                + " serie es el 1980. Se aceptan sólo 20 correlativos siguientes.";
        String separarcoma=(texto.replaceAll("[a-zA-Z^a-zA-Z.,úó]","")).replace(" ", "");//.substring(0,4);
        int cantidad = Integer.parseInt((texto.replaceAll("[a-zA-Z^a-zA-Z.,úó]","")).replace(" ", ""));
        System.out.println(cantidad);
//        separarcoma[0]
    }

}