private ArrayList<String> searchWithOneWildcards(String query) {
        ArrayList<String> res = new ArrayList<>();
            query = query.replace("$", "\\$");
            String regexp = query+"[0-9a-zA-Z]+";
            for(String elem: shiftIndex) {
                if (elem.matches(query+"\\w+")) {
                    res.add(elem);
                }
            }
        return res;
    }