问题
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