Hi @vitor, thanks for responding.
Ideally, this is how it should work:
-Starting text will look like this:
What is your favorite color?
Poppy Red
Sky Blue
Canary Yellow
Forrest Green
Everything before the "?" is the Question, and everything after is the Answers
-I would like to take that text, and modify it so it becomes:
What is your favorite color? Poppy Red OR Sky Blue OR Canary Yellow OR Forrest Green
I've figured out how to select everything before the "?" and everything after it, using regex expressions.
To grab everything the before the question mark I've used:
-Replace (regex) \?([^\?]+)$ with blank
-I then set that to variable = Question
To grab everything after the question mark I've used:
-Replace (regex) ^[\s\S]+\? with blank
-I then set that to variable = Answers
Sometimes, the answers appear like this:
Poppy Red
Sky Blue
Canary Yellow
Forrest Green
So I've tried to remove the line breaks using:
-Replace (regex) /$\s*[\r\n]/gm with ' OR '
However, I can't get it to apply this to the previous 'replace' utility, and when I test it using RegExr.com it ends up looking like this:
OR Poppy Red OR Sky Blue OR Canary Yellow OR Forrest Green
So that leaves me with 2 questions for now.
1) How do I string together multiple 'Replace' utilities, so that I can take the "Answers" section of the text and add in the " OR " 's ?
2) How do I make it so the " OR " is only added after the first non-blank line, so I don't end up with the first " OR " shown above?
-Thanks so much for your help!