Java tutorial
//package com.java2s; public class Main { private static final String PARAM_SEP = "/"; private static final String VALUE_SEP = ":"; private static final int USER_ID_INDEX = 1; public static int getUserIdFromQRText(String QRText) { String[] Params = QRText.split(PARAM_SEP); return Integer.parseInt(Params[USER_ID_INDEX].split(VALUE_SEP)[1]); } }