I have a string like XXXXNNNN-AN in one textbox and on button click I want to create 2 string one as 8(4X~4N),2(1A~1N) and other one is for separator 9(-), if I will get the string as XXAANN-XX-NN/AA then I want to create one string as 6(2X~2A~2N),2(2X),2(2N),2(2A), and other string will be as 7(-),10(-),13(/)