【发布时间】:2018-02-09 00:38:10
【问题描述】:
我有一个 cloudant nosql 数据库,其中有一些记录如下:
{
"role": "utente",
"nome": "Rocco",
"cognome": "Di Vitto",
"team": "sap pm-cs",
"company": "wrestling",
"appManager": "john Ford",
"teamLeader": "Rendy Orton, Colombo M.R."
}
我想使用 $regex the teamLeader 字段查询我的数据库,传递与“Randy Orton”或“Colombo M.R.”匹配的单个字符串但我无法弄清楚匹配两个逗号分隔字符串的正则表达式。我试过阅读 Erlang 查询结构,但没有找到解决方案。一些帮助会非常有用。提前致谢
【问题讨论】:
-
你的意思是this
-
在这个问题中没有看到
perl。 -
我编写了这个查询 { "selector": { "teamLeader": { "$.+(?|(Colombo M\.R\.)|(Rendy Orton)).+" : " Randy Orton" } } } 但它没有用。