Forum Discussion
DemoFour
3 years agoContinued Contributor
Error with Text.Trim
Hi people, I am trying to use a list with Text.Trim to remove punctuation and line breaks, but I am getting an error. In the Gill Raviv exersize 11-4, he uses Text.Trim and amended the code f...
ronrsnfld
3 years agoSuper User
What are you asking?
Text.Trim(Text, Trim) is going to remove all the characters in the Trim list from the beginning or end of Text. If your string ends with "!!!" and you have "!" in Trim, it will remove all of the "!"'s. You only need a single character listed.
If your use case is different, please clarify. For example, if the characters in Trim are not at the beginning or end.
DemoFour
3 years agoContinued Contributor
ronrsnfld
thank you for your response.
I have !!! etc. at the end of sets of text, So you are saying that just having ! in the list will remove all of them.
There are all sorts of random punctuations as it is twitter data and people do strange things to put emphasis on the point.
Ok I will revise and see what happens