@jinnyzor You just blew my mind away
Such a succinct and elegant solution. You are my hero. I did not have a clue that I could do that with split!!! i always used it to split strings based on symbols and not characters
It worked!
But when I ran the one of the log textfiles through the code, it broke down. I got an error: “Maximum call stack size exceeded” and the array does not look right. here is a snipped.
['2', '0', '2', '2', '-', '1', '2', '-', '0', '3', ' ', '0', '1', ':', '4', '3', ':', '0', '7', ':', ' ', 'E', 'x', 't', 'r', 'a', 'c', 't', 'i', 'o', 'n', ' ', 'o', 'f', ' ', 'S', 'n', 'a', 'p', 's', 'h', 'o', 't', 's', ' ', 'S', 't', 'a', 'r', 't', 'e', 'd', ' ', '.', '.', '.', '\n', 'C', 'h', 'e', 'c', 'k', 'i', 'n', 'g', ' ', 'f', 'o', 'r', ' ', 's', 'u', 'b', 'j', 'e', 'c', 't', ' ', 'l', 'i', 's', 't', '.', '.', '.', '\n', 's', 'u', 'b', '-', 'D', 'Z', '1', '7', 'B', 'H', '-', 's', 'e', 's', '-', '1', '_', 'r', 'u', 'n', 'l', 'i', 's', 't', '4', 'Q', 'C', '.', 't', 'x', 't', ' ', 'S', 'u', 'b', 'j', 'e', 'c', 't', ' ', 'L', 'i', 's', 't', ' ', 's', 'u', 'c', 'c', 'e', 's', 'f', 'u', 'l', 'l', 'y', ' ', 'M', 'a', 'd', 'e', '\n', 'C', 'h', 'e', 'c', 'k', 'i', 'n', 'g', ' ', 'f', 'o', 'r', ' ', 'T', 'h', 'i', 'c', 'k', 'n', 'e', 's', 's', ' ', 'f', 'i', 'l', 'e', ' ', 'i', 'n', ' ', 'f', 's', 'a', 'v', 'e', 'r', 'a', 'g', 'e', ' ', 's', 'p', 'a', 'c', 'e', ' ', '.', '.', '.', '\n', 'E', 'x', 'i', 's', 't', 'i', 'n', 'g', ' ', 'R', 'H', ' ', 'f', 's', 'a', 'v', 'e', 'r', 'a', 'g', 'e', ' ', 't', 'h', 'i', 'c', 'k', 'n', 'e', 's', 's', ' ', 'f', 'i', 'l', 'e', ' ', 'f', 'o', 'r', ' ', 'r', 'u', 'n', '-', '7', ' ', 'w', 'a', 's', ' ', 'f', 'o', 'u', 'n', 'd', '.', ' ', 'I', 't', ' ', 'w', 'i', 'l', 'l', ' ', 'b', 'e', ' ', 'u', 's', 'e', 'd', ' ', 'f', 'o', 'r', ' ', 's', 'n', 'a', 'p', 's', 'h', 'o', 't', 's', '.', '\n', 'E', 'x', 'i', 's', 't', 'i', 'n', 'g', ' ', 'L', 'H', ' ', 'f', 's', 'a', 'v', 'e', 'r', 'a', 'g', 'e', ' ', 't', 'h', 'i', 'c', 'k', 'n', 'e', 's', 's', ' ', 'f', 'i', 'l', 'e', ' ', 'f', 'o', 'r', ' ', 'r', 'u', 'n', '-', '7', ' ', 'w', 'a', 's', ' ', 'f', 'o', 'u', 'n', 'd', '.', ' ', 'I', 't', ' ', 'w', 'i', 'l', 'l', ' ', 'b', 'e', ' ', 'u', 's', 'e', 'd', ' ', 'f', 'o', 'r', ' ', 's', 'n', 'a', 'p', 's', 'h', 'o', 't', 's', '.', '\n', 'C', 'h', 'e', 'c', 'k', 'i', 'n', 'g', ' ', 'f', 'o', 'r', ' ', 'T', 'h', 'i', 'c', 'k', 'n', 'e', 's', 's', ' ', 'f', 'i', 'l', 'e', ' ', 'i', 'n', ' ', 'f', 's', 'a', 'v', 'e', 'r', 'a', 'g', 'e', ' ', 's', 'p', 'a', 'c', 'e', ' ', '.', '.', '.', '\n', 'E', 'x', 'i', 's', 't', 'i', 'n', 'g', ' ', 'R', 'H', ' ', 'f', 's', 'a', 'v', 'e', 'r', 'a', 'g', 'e', ' ', 't', 'h', 'i', 'c', 'k', 'n', 'e', 's', 's', ' ', 'f', 'i', 'l', 'e', ' ', 'f', 'o', 'r', ' ', 'r', 'u', 'n', '-', '5', ' ', 'w', 'a', 's', ' ', 'f', 'o', 'u', 'n', 'd', '.', ' ', 'I', 't', ' ', 'w', 'i', 'l', 'l', ' ', 'b', 'e', ' ', 'u', 's', 'e', 'd', ' ', 'f', 'o', 'r', ' ', 's', 'n', 'a', 'p', 's', 'h', 'o', 't', 's', '.', '\n', 'E', 'x', 'i', 's', 't', 'i', 'n', 'g', ' ', 'L']
I think I can troubleshoot this but here is the textfile I am trying to run through it. In case you would like to check out what is going on. Box