- 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.
12 Respostas
+ 1
Hello Taste. Thank you very much for your help.
+ 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.
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
0
Taste, I cannot use regex.
0
Why ?
0
I am using a software (with drag and drop). And in this software, I can use some function in VBSCRIPT (not all).
0
What software ?
0
nicelabel.
0
I just download the usermanual for nicelabel 2017. Regex are supported you can look at the bottom part page 25 in green box
0
woaw!!!
0
Who are tou Taste?
You are one of the best in this world!!!
0
Nah, i just try to help