Java tutorial
//package com.java2s; public class Main { /** * * @param uri * @return */ public static String parseNameFromURI(String uri) { if (!uri.contains("#")) { return uri; } return uri.substring(uri.lastIndexOf("#") + 1); } }