How to remove/replace word wraps in a string?
Posted: 25 Mar 2015 14:13
Hello together,
sorry if this is a stupid question, but I just don't see how this should work:
I want to write a script, were I request a string from the user via the input() function and show him a multi-line textfield. There, he should enter some items of text, each of them seperated by a comma or on a new line. For me to further work with the string, I now want to replace all the word wraps (if any) with a comma, so that I have only one seperator left. If I try to do this
it almost seems to work, at least I get my comma, but the word wrap is still there and my output (with "msg") looks like this:
or this:
but not like this:
Maybe one of you has a clue at how to do this?
Thank you in advance for any suggestions.
P.S.: Sorry for anything written wrong or unclear, english is not my mother language.
sorry if this is a stupid question, but I just don't see how this should work:
I want to write a script, were I request a string from the user via the input() function and show him a multi-line textfield. There, he should enter some items of text, each of them seperated by a comma or on a new line. For me to further work with the string, I now want to replace all the word wraps (if any) with a comma, so that I have only one seperator left. If I try to do this
Code: Select all
regexreplace("<my input string>", chr(10), ",", 1)Code: Select all
Hallo,
Hallo2Code: Select all
Hallo
,Hallo2Code: Select all
Hallo,Hallo2Maybe one of you has a clue at how to do this?
Thank you in advance for any suggestions.
P.S.: Sorry for anything written wrong or unclear, english is not my mother language.