"Like" operator

squinn03

squinn
Local time
Today, 07:38
Joined
Apr 19, 2007
Messages
16
I need to test if a string is five alphanumeric characters.

I use the following:

if str like "[A-Z,0-9][A-Z,0-9][A-Z,0-9][A-Z,0-9][A-Z,0-9]" then...

This is also a table validation rule in my database.

Does anyone know if there's a better way of writing this?
For example, something like 5([A-Z,0-9])?
I tried it but it does not work.
 
By using a loop len() times.
With 5 characters, it won't be much different, but that would if you had hundreds of them.
 

Users who are viewing this thread

Back
Top Bottom