Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何返回非数字文本?
for $foo in db:open("foo") return $foo//text()
假设原始电子表格中的每个地址或电话号码单元格都有数字,我希望返回任何没有数字的字符串。
上下文,根据迈克尔凯的说明:
电子表格的每个单元格都有一个字符串。只有一列很容易成为CSV数据。看起来,只有名字没有数字。在这个假设下,希望将数据分解成“块”以区分每个人。数据没有真正的模式。
CSV
我希望返回任何没有数字的字符串。
正则表达式可以做到这一点:
for $foo in db:open("foo") return $foo//text()[not(matches(., '[0-9]'))]