You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2022/01/11 14:07:02 UTC

[GitHub] [tinkerpop] spmallette commented on a change in pull request #1542: Add TextP.regex text predicate

spmallette commented on a change in pull request #1542:
URL: https://github.com/apache/tinkerpop/pull/1542#discussion_r782175976



##########
File path: docs/src/reference/the-traversal.asciidoc
##########
@@ -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`?

Review comment:
       i'd have preferred `match()` as well but it conflicts with `match()`-step. 
   
   > Also, we don't need a special negation syntax, since the user can do
   
   The negate is there to satisfy the `Predicate.negate()` with a non-lambda for serialization purposes. we might add a comment thought to say that it typically isn't recommended to use it.
   
   `like()` is actually a nice alternative as it makes the `notLike()` easier. `like()` isn't self-explaining like `regex()` but perhaps that's not a problem. I'd be happy with `like()`. I suppose i'd also be in favor of `matches()` which is amenable to the negation.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org