[英]Openrefine, match text inside parentheses
I'm having cells like 我有像
10 (1880 15) ; 11 (1880 15) ; 12 (1880 15) ; 7 (1880 15) ; 3 (1880 15) ; 9 (1880 15) ; 2 (1880 15) ; 1 (1880 15) ; 4 (1880 15) ; 5 (1880 15) ; 6 (1880 15) ; 8 (1880 15)
and I want to take all the text inside the parentheses. 我想将所有文字放在括号内。 Using this expression it gives me a Null result:
使用此表达式可以给我一个Null结果:
value.match(/\(.*?\)/)
Why that? 为什么? Thanks
谢谢
The match
function does not work as you think . match
功能无法正常工作 。 It is very counter-intuitive. 这是非常违反直觉的。 That's why since Open Refine 3 there is a
find
function that does exactly what you want. 这就是为什么从Open Refine 3开始,有一个
find
函数可以完全满足您的需求的原因。
value.find(/\(.*?\)/)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.