Index: trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 11191)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 11192)
@@ -889,5 +889,7 @@
                 } catch (PatternSyntaxException e) {
                     throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()), e);
-                } catch (IllegalArgumentException e) {
+                } catch (IllegalArgumentException | StringIndexOutOfBoundsException e) {
+                    // StringIndexOutOfBoundsException catched because of https://bugs.openjdk.java.net/browse/JI-9044959
+                    // See #13870: To remove after we switch to a version of Java which resolves this bug
                     throw new ParseError(tr(rxErrorMsgNoPos, s, e.getMessage()), e);
                 }
