Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions modules/ROOT/pages/syntax/parsing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,27 @@
This page provides a general overview of how Cypher parses an input `STRING`.

The Cypher parser takes an arbitrary input `STRING`.
While the syntax of Cypher is described in subsequent chapters, the following details the general rules on which characters are considered valid input.
This page details the general rules on which characters are considered valid input.

== Using unicodes in Cypher

Unicodes can generally be escaped as `\uxxx`.
For example, the below query uses the Unicode `u00B0` to search for any recipe descriptions containing the degree symbol, `º`:

.Using Unicodes in `STRING` matching
[source, cypher]
----
MATCH (r:Recipe)
WHERE r.description CONTAINS "\u00B0"
RETURN r
----

Additional documentation on escaping rules for `STRING` literals, names and regular expressions can be found here:

* xref::queries/expressions.adoc#expressions-string-literals[String literal escape sequences]
* xref::syntax/naming.adoc#symbolic-names-escaping-rules[Using special characters in names]
* xref::clauses/where.adoc#escaping-in-regular-expressions[Regular expressions]

The following example escapes the unicode character `A` (`\u0041`) in the keyword `MATCH`:

[source, syntax]
----
M\u0041TCH (m) RETURN m;
----

The Unicode version used by Cypher depends on the running JVM version.

[options="header", cols="1,2,3"]
Expand Down