Hello,
I'm trying to split a string of text using a multicharacter delimiter, but the split method appears to only support a one character delimiter. Is there a simple way to split using multiple characters?
Example:
My file contains this: ISA*DATA*DATA*DATA*DATA*DATA~ISA*DATA*DATA*DATA*DATA~ISA*DATA*DATA~
I would need to split it on "ISA*". Below is an example of the output when I try to just use the split method. Any idea why I'm getting that output and what a better way to do it is?
$test = "ISA*DATA*DATA*DATA*DATA*DATA~ISA*DATA*DATA*DATA*DATA~ISA*DATA*DATA~" $test2 = $test.split("ISA*") $test2 D T D T D T D T D T ~ D T D T D T D T ~ D T D T ~