You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by kr...@apache.org on 2022/01/07 21:42:16 UTC

[tinkerpop] 14/15: Add documentation for TextP.regex

This is an automated email from the ASF dual-hosted git repository.

krlawrence pushed a commit to branch TINKERPOP-2652
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit a1522a811db7cb2442a49daab0a9d9e0afc30590
Author: Kelvin Lawrence <gf...@yahoo.com>
AuthorDate: Wed Dec 15 12:35:20 2021 -0600

    Add documentation for TextP.regex
---
 docs/src/reference/the-traversal.asciidoc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 98f2e8d..7dd001b 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -4077,7 +4077,8 @@ A `P` is a predicate of the form `Function<Object,Boolean>`. That is, given some
 the release of TinkerPop 3.4.0, Gremlin also supports simple text predicates, which only work on `String` values. The `TextP`
 text predicates extend the `P` predicates, but are specialized in that they are of the form `Function<String,Boolean>`.
 The provided predicates are outlined in the table below and are used in various steps such as <<has-step,`has()`>>-step,
-<<where-step,`where()`>>-step, <<is-step,`is()`>>-step, etc.
+<<where-step,`where()`>>-step, <<is-step,`is()`>>-step, etc. Two new additional `TextP` predicate members were added in the
+TinkerPop 3.6.0 release that allow working with regular expressions. These are `TextP.regex` and `TextP.notRegex`
 
 [width="100%",cols="3,15",options="header"]
 |=========================================================
@@ -4099,8 +4100,12 @@ The provided predicates are outlined in the table below and are used in various
 | `TextP.notStartingWith(string)` | Does the incoming `String` not start with the provided `String`?
 | `TextP.notEndingWith(string)` | Does the incoming `String` not end with the provided `String`?
 | `TextP.notContaining(string)` | Does the incoming `String` not contain the provided `String`?
+| `TextP.regex(string)` | Does the incoming `String` match the regular expression in the provided `String`?
+| `TextP.notRegex(string)` | Does the incoming `String` fail to match the regular expression in the provided `String`?
 |=========================================================
-
+Note that the TinkerPop reference implementation uses the Java `Pattern` and `Matcher` classes for it regular expression
+engine. Other implementations may decide to use a different regular expression engine. It's a good idea to check
+the documentation for the implementation you are using to verify the allowed regular expression syntax.
 [gremlin-groovy]
 ----
 eq(2)