From 9a56b7ed2e77f1e1a1d22b790d1bc6d6ab6244fe Mon Sep 17 00:00:00 2001 From: Natalia Ivakina Date: Mon, 13 Oct 2025 14:24:29 +0200 Subject: [PATCH 1/2] Explain the use of double backslashes with regex --- modules/ROOT/pages/import.adoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/ROOT/pages/import.adoc b/modules/ROOT/pages/import.adoc index b54a3c741..f558d9d37 100644 --- a/modules/ROOT/pages/import.adoc +++ b/modules/ROOT/pages/import.adoc @@ -545,6 +545,12 @@ For example: bin/neo4j-admin database import full --nodes import/node_header.csv,import/node_data_\d+\.csv ---- +[NOTE] +==== +It is important to remember that in many scripting languages you often need to use double backslashes (`\\`) when writing regular expression patterns inside string literals. +==== + + ==== Import data from CSV files using a more complex regular expression For regular expression patterns containing commas, which is also the delimiter between files in a group, the pattern can be quoted to preserve the pattern. From 4a287cf819ceade11a9607ce41f593d38b9423b3 Mon Sep 17 00:00:00 2001 From: Natalia Ivakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:55:19 +0200 Subject: [PATCH 2/2] Update the note --- modules/ROOT/pages/import.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/import.adoc b/modules/ROOT/pages/import.adoc index f558d9d37..8cac275b1 100644 --- a/modules/ROOT/pages/import.adoc +++ b/modules/ROOT/pages/import.adoc @@ -547,7 +547,8 @@ bin/neo4j-admin database import full --nodes import/node_header.csv,import/node_ [NOTE] ==== -It is important to remember that in many scripting languages you often need to use double backslashes (`\\`) when writing regular expression patterns inside string literals. +In many scripting languages, you must use double backslashes (`\\`) when defining regular expression patterns inside string literals. +This is because a single backslash (`\`) is treated as an escape character. ====