Corey H. wrote:
but if you can describe why you want to do it, there might be a different way
It is kind of hard to explain but I have a long string that someone
typed into a form which was then saved into a database. They used made
up tags such as “, , , , …” I
the different tags they wrote.
I have it working for everything except one task. In this one task I
The problem is it is pulling the phrase apart at every space. I know I
can add .each(???) and have it pull everything apart at the ??? but it
would involve a lot of adding ??? to this long string.
What I am trying to do is add a while loop inside the block that will
look ahead at the next substring to see if it is a “”. If it
is I want it to exit the while loop and go on without throwing away the
“” tag because it is needed next time through the block.
Sorry if that didnt make sense at all.