Hi,
Have a source file containing this following sample text:
ID|PATTERN1|USER1
ID|PATTERN1\|PATTERN2|USER2
ID|PATTERN1\|PATTERN2\|PATTERN3|USER3
ID|PATTERN4|USER1
.....
.....
Each line actually has only 3 fiedls delimited by "|". But the problem is the possible combination of "\|" that may occur inside the second field. Not sure how I might use the split or other function to deal with the "\|" to split the data into:
$field1 = text in ID field
$field2 = text representing PATTERN1\|PATTERN2\|.... etc
$field3 = text in USER field
Thanks,
Mike
Have a source file containing this following sample text:
ID|PATTERN1|USER1
ID|PATTERN1\|PATTERN2|USER2
ID|PATTERN1\|PATTERN2\|PATTERN3|USER3
ID|PATTERN4|USER1
.....
.....
Each line actually has only 3 fiedls delimited by "|". But the problem is the possible combination of "\|" that may occur inside the second field. Not sure how I might use the split or other function to deal with the "\|" to split the data into:
$field1 = text in ID field
$field2 = text representing PATTERN1\|PATTERN2\|.... etc
$field3 = text in USER field
Thanks,
Mike