我进行以下查询
neo4j-sh (?)$ start n=node(*) where n.name =~ 'u(.*)' return n;
==> +-----------------------+
==> | n |
==> +-----------------------+
==> | Node[311]{name:"u1"} |
==> | Node[312]{name:"u2"} |
==> | Node[313]{name:"u3"} |
==> | Node[314]{name:"u4"} |
我想添加一个“userId”属性并将其设置为名称键中的数字。我的意思是我想要
==> +-----------------------+
==> | n |
==> +-----------------------+
==> | Node[311]{name:"u1", userId:'1'} |
==> | Node[312]{name:"u2", userId:'2'} |
==> | Node[313]{name:"u3"},userId:'3' |
==> | Node[314]{name:"u4"}, userId:'4' |
现在我需要从 n.name 中删除数字。我怎样才能做到这一点?如何从正则表达式中的 (.*) 获取值?