Simple XQuery FLWOR to return text without numbers

╄→гoц情女王★ 提交于 2020-04-16 06:08:11

问题


How do I return non-numeric text?

for $foo  in db:open("foo")
return $foo//text()

Assuming that every address or phone number cell from the original spreadsheet has numerals, I'm looking to return any string without numerals.


context, per Michael Kay's note:

Each cell of the spreadsheet has a String. There's only one column of what can easily be CSV data. Seemingly, only the names lack numerals. On that assumption, looking to break the data into "chunks" to differentiate each individual. There's no real pattern to the data.


回答1:


I'm looking to return any string without numerals.

Regex could do that:

for $foo in db:open("foo")
return $foo//text()[not(matches(., '[0-9]'))]


来源:https://stackoverflow.com/questions/60223486/simple-xquery-flwor-to-return-text-without-numbers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!