A question about the regex query

Regular expression is an attribute of node, for example, cmd_line is an attribute, the first parameter is a specific value, not an atribute. so how to write a query like this?

{
  directors(func: regexp("net user test /add", /cmd_line/)) {
    cmd_line
  }
}

大哥你的query 语法错了。

Your syntax is wrong.

this is the correct syntax

{
  directors(func: regexp(PREDICATE_TO_SEARCH_FOR, "regex")) {
    cmd_line
  }
}

我提供的例子是我想要的功能,
我的需求是这样的,我有一个节点A属性存的是正则表达式,有一个节点B的属性是要用正则表达式匹配的具体值。要查询B的值是不是满足A,有什么最快速的方式吗。[quote=“chewxy, post:2, topic:10083, full:true”]
大哥你的query 语法错了。

Your syntax is wrong.

this is the correct syntax

{
  directors(func: regexp(PREDICATE_TO_SEARCH_FOR, "regex")) {
    cmd_line
  }
}

[/quote]