I've got data that comes in the following format, and I have no control over the format:
UPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet charactersUPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet charactersUPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet charactersUPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet characters
I need to split it up into an array where each element contains the following:
UPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet characters
UPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet characters
UPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet characters
UPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet characters
There are no : in the string anywhere, it's not a legal character for the data, so why couldn't they use it as a delimeter? Ah well.
The string can be quite large as in sometime 500K to a million characters, though usually it is smaller. I know preg_replace doesn't work well in those situations with such large strings, so adding a : delimiter via preg_replace so I could just explode it would work some of the time but not all the time.
Any ideas?
UPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet charactersUPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet charactersUPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet charactersUPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet characters
I need to split it up into an array where each element contains the following:
UPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet characters
UPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet characters
UPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet characters
UPPERCASEATHROUGHZTEXTdata that does not contain any a-z alphabet characters
There are no : in the string anywhere, it's not a legal character for the data, so why couldn't they use it as a delimeter? Ah well.
The string can be quite large as in sometime 500K to a million characters, though usually it is smaller. I know preg_replace doesn't work well in those situations with such large strings, so adding a : delimiter via preg_replace so I could just explode it would work some of the time but not all the time.
Any ideas?