Java tutorial
//package com.java2s; public class Main { final static String YY_RETURN_DATA = "yy://return/"; final static String EMPTY_STR = ""; final static String SPLIT_MARK = "/"; public static String getFunctionFromReturnUrl(String url) { String temp = url.replace(YY_RETURN_DATA, EMPTY_STR); String[] fuctionAndData = temp.split(SPLIT_MARK); if (fuctionAndData != null && fuctionAndData.length >= 1) { return fuctionAndData[0]; } return null; } }