Forum Discussion
Galat
6 years agoFrequent Visitor
How Clean Text Data
Hi, I need to pull all the single words out of the sentence. I mean I should have just been words without numbers or any other symbol! I use the following formula: Table.AddColumn (# "Changed Type...
- 6 years ago
Hi Galat,
I searched and found this:
Text.Select([name],{"a".."z","A".."Z","0".."9"," "})By the way, I found that on this thread:
Hope this helps!
Anonymous
6 years agoNot applicable
For another situation I had built a function that removes "non-standard" characters from a text. I think it could be for you.
let
fnCngNotStndCharsToDef = (str_in as text, stndChrs as list, optional defChar as text) =>
Text.Combine(
List.Transform(
Splitter.SplitTextByRepeatedLengths(1)(str_in),
each Record.FieldOrDefault(Record.FromList(stndChrs, stndChrs), _, defChar)
)
)
in
fnCngNotStndCharsToDef
an example of use:
PS
Actually the function has a slightly more general extension, being able to replace non-standard characters with a chosen default character.
If this is omitted, the result is to remove unwanted characters.