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 02:26:45 UTC

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

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



##########
File path: gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Text.java
##########
@@ -29,6 +31,48 @@
  */
 public enum Text implements BiPredicate<String, String> {
 
+    /**
+     * Evaluates if the first string has a regex match with the second (pattern).
+     *
+     * @since 3.6.0
+     */
+    regex {
+        @Override
+        public boolean test(final String value, final String regex) {
+            Pattern pattern = Pattern.compile(regex);

Review comment:
       final 




-- 
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