I just gave you an example, not the solution
.
Here you are talking about RegEx ???
In the second step, i need also to regulate the field for ex.:
- alphanumerical field in that format (AAAAAA11A11A111A)
A=letter(text) 1=number
lenth 16 (if not 16 caracters the field have to give error to the user)
By the way, do not use PICs when you show some code!
Use CODE-TAGS, like this…
$w. onReady(function() { }
Me for example, i am a very lazy person, i would NOT write all your code by myself. Either the code is already given, which i can copy or the issue do not interesst me.
You understand what i want to say?
If you want a good and fast help, then the helper needs a good and easy to understanding description of the problem, and also a ready code to work with.
And also enough INPUT, to give you at the end enought OUTPUT ! 
And YES, you can delete all that SHITTY-CODE and just let this line untouched…
$w. onReady(function() { }
This is the STARTING-POINT of your CODE.
When page has loaded, this will start automatically.
Now you add your own function, which will start emidiatelly after the page has loaded completely…
$w.onReady(function() { start_FirstFunction() }
function start_FirstFunction() { ...here your action-code ....}
A step further?..
$w.onReady(function() { start_FirstFunction() }
function start_FirstFunction() {
console.log("Function started!")
}
Your first little working CODE!
Now test it either in PREVIEW-MODE or in LIVE does not matter.
When testing in PREVIEW-MODE, than take a look at the very bottom of the editor-site. You will find there a CONCOLE, which will show you the output (results) of the function.
OR…
When using the LIVE-MODE, for example in CHROME-WEBBROWSER, then press F-12 and go to CONSOLE. You will find there almost the same like in PREVIEW-MODE.
Delete your CODE completely and put this one in and test it.
$w.onReady(function() { start_FirstFunction() }
function start_FirstFunction() {
console.log("Function started!")
}
When you understood it then you can make the next step…
$w.onReady(function() { start_FirstFunction() }
function start_FirstFunction() {console.log("Function started!")
let myString1 = ($w('#YourInputField_ID_here').value).toUpperCase()
console.log(myString)
}
Replace —> YourInputField_ID_here with your own INPUT_FIELD-ID !
This example is just for one INPUT-FIELD.
You will have later to EXPAND the CODE.
Your CODE is growing.
Now do some brainstorming, how to continue?
Use the forum-searchbar, you will find enough example-stuff.
You can also visit my site, to learn a little bit 
https://russian-dima.wixsite.com/meinewebsite