Code:
clear input HAVE WANT1 WANT2 AA01 AA 01 AZ02 AZ 02 AV03 AV 03 AA04 AA 04 AA05 AA 05 A06 A 06 A07 A 07 A08 A 08 A09 A 09 A1Z0 AZ 10 B11 B 11 BB12 BB 12 BQ13 BQ 13 D14 D 14 F15 F 15 G16 G 16 G17 G 17 H18 H 18 I19 I 19 I20 I 20 I21 I 21 I22 I 22 II23 II 23 end
I have variable 'HAVE' and wish to get 'WANT1' and 'WANT2' where 'WANT1' is the alpha character in 'HAVE' and 'WANT2' is the numeric. I know how to split string based on position for example to take the first or second character of the string but I do not know how to specify to put the alpha characteristics in 'WANT1' and the numeric in 'WANT2'
I crosspost this on Stack Overflow.
0 Response to Split String
Post a Comment