@Test
    void testRegexp() {
        {
            QueryTree x = parse("select * from sources * where foo matches \"a b\"");
            Item root = x.getRoot();
            assertSame(RegExpItem.class, root.getClass());
            assertEquals("a b", ((RegExpItem) root).stringValue());
        }

        {
            String expression = "a\\\\.b\\\\.c";
            QueryTree query = parse("select * from sources * where foo matches \"" + expression + "\"");
            var regExpItem = (RegExpItem) query.getRoot();
            assertEquals("a\\.b\\.c", regExpItem.stringValue());
            assertTrue(regExpItem.getRegexp().matcher("a.b.c").matches(), "a.b.c is matched");
            assertFalse(regExpItem.getRegexp().matcher("a,b,c").matches(), "a,b,c is matched?");
        }
    }
Specification for the conversion of YQL+ expressions to Vespa search queries.

@author Steinar Knutsen
@author Stian Kristoffersen
container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java