I am trying to tokenize a string that contains non-displayable characters i.e. EBCDIC or ASCII. How to split a string based on some EBCDIC or ASCII characters. e.g.
X'1D', X'1C', X'1A' and X'c8' represents the non-displayable characters in the string that I need to set as tokenizers, the tokenizers are placed in the string just to visualize what I want to do:
"I am trying to split this string X'1D'and also testing X'1C' along with X'1A' and this too X'c8', and see if works."
and after parsing or splitting my final result will be like as:
I am trying to split this string
and also testing
along with
and this too
, and see if works.
As the original string will look like as follows where represents any HEX character as described in the above sample which I need to set as a Token. can be any HEX character but I just want to split on some of them.
"StartTEST1TEST2TEST3TEST4TEST5TEST6TEST7TEST812END"
based on my Tokens the output may look as below:
StartTEST1
TEST2
TEST3TEST4TEST5TEST6
TEST7
TEST8
1
2
END
Any idea how to do this. Any help is appreciated.
Thanks
X'1D', X'1C', X'1A' and X'c8' represents the non-displayable characters in the string that I need to set as tokenizers, the tokenizers are placed in the string just to visualize what I want to do:
"I am trying to split this string X'1D'and also testing X'1C' along with X'1A' and this too X'c8', and see if works."
and after parsing or splitting my final result will be like as:
I am trying to split this string
and also testing
along with
and this too
, and see if works.
As the original string will look like as follows where represents any HEX character as described in the above sample which I need to set as a Token. can be any HEX character but I just want to split on some of them.
"StartTEST1TEST2TEST3TEST4TEST5TEST6TEST7TEST812END"
based on my Tokens the output may look as below:
StartTEST1
TEST2
TEST3TEST4TEST5TEST6
TEST7
TEST8
1
2
END
Any idea how to do this. Any help is appreciated.
Thanks