I need to split a string dynamically
that may have different format(a:b,a.b,a/b) to an array of two elements.For example :
string :- abs:sba;//array[0]='abs';array[1]='sba';
string :- abs.sba;//array[0]='abs';array[1]='sba';
string :- abs/sba;//array[0]='abs';array[1]='sba';
I have tried with string.split(':');
method,but it will not be applicable for the next two cases.I need a solution which split the string dynamically.
code
" – elclanrs 11 hours ago