I am trying to iterate over a string such that it breaks up into substrings that I append to the end of a vector. Also, I am trying to have a few other rules as well. (apostrophes are considered alphanumeric, if a ',' appears between digits its ok if a '.' appears before a digit/whitespace or between digits its ok)
For example:
This'.isatest!!!!andsuch .1,00,0.011#$%@
Would come out as:
myvector[This'][.][isatest][!!!!][andsuch][.1,00,0.011][#$%@]
I have no trouble splitting on nonalphanumeric characters (and apostrophes), and also an if statement for the ',' and '.', but I am running into trouble keeping the delimiters. Currently, I am getting something more like:
myvector[This'][.][isatest][!][!][!][!][andsuch][.1,00,0.011][#][$][%][@]
Any useful tips?