- 1

Vbscript or Python verify comparé a string

Hello everybody, I would like to scan a barcode. The barcode must be like this: 2char + 1space + 8numerics If it doesn’t respect this mask, result FALSE. Also, I would like to verify if the 2char exist in one choice list (but this part is not necessary, only an option). Thank you very much for your help.

14th Dec 2018, 12:33 PM
Abdel
Abdel  - avatar
12 Answers
+ 1
Hello Taste. Thank you very much for your help.
14th Dec 2018, 3:42 PM
Abdel
Abdel  - avatar
+ 1
I am trying to get some help on a soft named Windev Mobile. And i never get any answers. So i am very happy here in SoloLearn with you guies.
14th Dec 2018, 6:24 PM
Abdel
Abdel  - avatar
0
Use regex to check pattern, i'm sure both vbs and py has a function to check regex. Here's some that can help to define a pattern ^ start with what after this symbol [a-z] to check lowercase char [A-Z] to check uppercase [0-9] to check numeric \s to check whitespace {2} any char or num length defined before it must be 2 $ must ends with what defined before this symbol For example ^[0-9]{5}l[A-Z]{3}$ That means it need to start with 5 numbers followed by l then end with 3 uppercase character. Example string with that pattern 23lHJQ 08lBWO 00lAAA 99lZZZ More on that here https://www.sololearn.com/learn/9704/?ref=app
14th Dec 2018, 3:23 PM
Taste
Taste - avatar
0
Taste, I cannot use regex.
14th Dec 2018, 3:50 PM
Abdel
Abdel  - avatar
0
Why ?
14th Dec 2018, 4:01 PM
Taste
Taste - avatar
0
I am using a software (with drag and drop). And in this software, I can use some function in VBSCRIPT (not all).
14th Dec 2018, 5:28 PM
Abdel
Abdel  - avatar
0
What software ?
14th Dec 2018, 5:44 PM
Taste
Taste - avatar
0
nicelabel.
14th Dec 2018, 6:03 PM
Abdel
Abdel  - avatar
0
I just download the usermanual for nicelabel 2017. Regex are supported you can look at the bottom part page 25 in green box
14th Dec 2018, 6:11 PM
Taste
Taste - avatar
0
woaw!!!
14th Dec 2018, 6:12 PM
Abdel
Abdel  - avatar
0
Who are tou Taste? You are one of the best in this world!!!
14th Dec 2018, 6:13 PM
Abdel
Abdel  - avatar
0
Nah, i just try to help
14th Dec 2018, 6:14 PM
Taste
Taste - avatar