Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static final Pattern PATH_VARIABLE_PATTERN = Pattern.compile("/\\{([a-zA-Z]+)\\}"); public static boolean hasPathVariables(String routePath) { Matcher matcher = PATH_VARIABLE_PATTERN.matcher(routePath); return matcher.find(); } }