fso| Skills
<script language=vbs>
my_string = "a110b121c119d1861"
A_value = Mid (my_string,2,3)
Alert (A_value)
</script>
But imagine: if not "110", but "1100", that is not to extract 4 bits ... This shows that the procedure is not perfect.
So keep thinking: the extracted value is always after the letter "a", and the value is always between the letter "a" and "B", so as long as the "a", "B" position, then the starting bit of the median value should be the letter "a" bit +1, the middle value should be the length of the letter "B" bit-The letter "A" bit-1
So now you can make the program perfect:
<script language=vbs>
my_string = "a110b121c119d1861"
A_num = InStr (my_string, "A")
B_num = InStr (my_string, "B")
A_value = Mid (My_string,a_num+1,b_num-a_num-1)
Alert (A_value)
</script>
OK, so now you can completely extract the value one by one after the letter "B", "C", and "D".
Of course, we need to pay attention to the "D" after a few how to take it? Take the total length of the string-the number of places where the letter D is.
<script language=vbs>
my_string = "a110b121c119d1861"
A_num = InStr (my_string, "A")
B_num = InStr (my_string, "B")
C_num = InStr (my_string, "C")
D_num = InStr (my_string, "D")
Total_num = Len (my_string)
A_value = Mid (My_string,a_num+1,b_num-a_num-1)
B_value = Mid (My_string,b_num+1,c_num-b_num-1)
C_value = Mid (My_string,c_num+1,d_num-c_num-1)
D_value = Mid (My_string,d_num+1,total_num-d_num)
Alert (A_value)
Alert (B_value)
Alert (C_value)
Alert (D_value)
</script>