I have a text file which contains data seperated by \'|\'. I need to get each field(seperated by \'|\') and process it. The text file can be shown as below :
you can use the constructor that takes an extra 'returnDelims' boolean, and pass true to it.
this way you will receive the delimiters, which will allow you to detect this condition.
alternatively you can just implement your own string tokenizer that does what you need, it's not that hard.