diff --git a/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/RouteHelper.java b/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/RouteHelper.java index c4e95d0b1..04a0fa957 100644 --- a/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/RouteHelper.java +++ b/src/main/java/fr/adrienbrault/idea/symfony2plugin/routing/RouteHelper.java @@ -262,9 +262,14 @@ private static boolean isReverseRoutePatternMatch(@NotNull Route route, @NotNull String substring = match.substring(0, i); String regex = substring.replace(string, "[\\w-]+"); - Matcher matcher = Pattern.compile(regex).matcher(searchPath); - if (matcher.matches()) { - return true; + + // user input + try { + Matcher matcher = Pattern.compile(regex).matcher(searchPath); + if (matcher.matches()) { + return true; + } + } catch (Exception ignored) { } }