Ask Your Question
0

How can strings containing multiple slashes be matched with AQL?

asked 2021-10-11 11:00:00 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-05-21 19:00:00 +0000

david gravatar image

Strings containing multiple slashes can be matched with AQL by using the ESCAPE keyword followed by a single slash. This will treat the following character as a literal rather than a special character. For example:

LET myString = "C:/documents/slides/"
FOR doc IN documents
  FILTER doc.path == ESCAPE(myString, '/')  // Escaping the slashes in myString
  RETURN doc

This query will match documents whose path attribute is equal to C:/documents/slides/.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-10-11 11:00:00 +0000

Seen: 17 times

Last updated: May 21 '22