Forum Discussion
A Simple Method to Filter Text Strings in Query Editor
- 9 years ago
No need to lowercase. Try this:
Text.Remove(..YourText.., List.Transform({0..64, 91..96, 123..50000}, each Character.FromNumber(_))))
This will remove every character within the range of 0..50000 that isn't a..z or A..Z. So if you have some special signs that you want to include, you need to find the number (Character.ToNumber) and include those numbers in the list above.
I'm thinking I should set everything to lowercase, then create a whitelist for a-z. Probably the best way to eliminate odd characters. Thank you.
Greg B
No need to lowercase. Try this:
Text.Remove(..YourText.., List.Transform({0..64, 91..96, 123..50000}, each Character.FromNumber(_))))
This will remove every character within the range of 0..50000 that isn't a..z or A..Z. So if you have some special signs that you want to include, you need to find the number (Character.ToNumber) and include those numbers in the list above.
- pfuschi9 years agoAdvocate I
Hi Imke
This also removes characters written in non-latin alphabetics....
Any suggestions?
- ImkeF9 years agoCommunity ChampionYou need to find the corresponding numbers to these characters. Easiest might be to create a " translation-table", load it to excel and then search & Identify your ranges: Create a list: {1..50000}, convert to table and add a column: Character.FromNumber([ColumnName]).
- Brian_M9 years agoContinued Contributor
Nice!