【发布时间】:2018-04-24 10:17:07
【问题描述】:
我有一个字符串查询,我想匹配和提取特定的单词。
当我有这个词word.EXACT提取这个词的容器
赞MESH.EXACT("blood glucose monitoring") 提取词"blood glucose monitoring"
- words.exact("N-Words") -> 结果
"N-Words" - words.exact(N-Words) -> 结果
N-Words
Query_Input= (EMB.EXACT("insulin treatment")) and (MESH.EXACT("blood glucose monitoring")) OR "Self-Monitoring of Blood Glucose”
输出必须是这样的
Query_out="insulin treatment" "blood glucose monitoring" "Self-Monitoring of Blood Glucose”
这个演示有我的正则表达式和我的正则表达式:https://regex101.com/r/rqpmXr/15
【问题讨论】:
-
你的答案接近我的结果,但在这种情况下是错误的jsfiddle.net/3z2qafc6/4,因为输出需要是
"blood glucose monitoring" words "blood glucose monitoring" -
@WiktorStribiżew 我会认为你的答案是正确的
标签: javascript regex