Dears,
Is it possible to split string ( Text) based on punctuation: dot “.” , comma “,” “2 Points “:””,“New Line”, …etc ? Thanks
Dears,
Is it possible to split string ( Text) based on punctuation: dot “.” , comma “,” “2 Points “:””,“New Line”, …etc ? Thanks
Hi @hsendel,
Have you got an example string?
StringVar.Split({"."},StringSplitOptions.None)
will split by dot into an array of strings, you can replace the punctuation as necessary
Thanks @william.coulson , I found one of your answers here : Split sting and add it to array - #4 by william.coulson
By the way is it possible to include all those punctuation in single command?
Hi @hsendel,
Have a look at this topic and see if it helps you:
What should be the variable type here : String[ ] ?
Command :
Error Message :
Hi @hsendel,
ListPhrases needs to be List<String>
(System.Collections.Generic.List<System.String>
)
Great !!! How to exclude the empty lines ?
Hi @hsendel,
Try StringVar.Split({"."},StringSplitOptions.RemoveEmptyEntries).ToList
This was suggested on the topic I linked earlier
Hello @william.coulson , Unfortunately it’s not removing empty spaces, Probably need to remove empty lines first, no?
Fixed on Delete new line and unwanted space - #9 by Vijay_Tulsalkar
Thanks a lot @william.coulson for your support
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.