1
votes

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
It seems a strange requirerment. You really want to return "Rose Cottage, Oak Lane", but not "Rose Cottage, 13 Oak Lane"?Michael Kay
In short, @MichaelKay : "yes". I added an explanatory note.Thufir

1 Answers

3
votes

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]'))]