I am trying to write a constraint in an XLS form for a survey which allows
3 letters, then 5 numbers, i.e. ABC12345.
I have gotten to allowing 3 letters and 5 numbers, but it does not require
them to be in the correct order (i.e. A1B2C345) with the following code: .
= regex ( ., "^[A-Z,0-9]{8}$")
How do I write the constraint so that all letters must be first, followed
by numbers?
···
From: Megan
Sent: Friday, August 01, 2014 10:52 AM
To: opendatakit@googlegroups.com
Subject: [ODK Community] Constraint 3 letters, 5 numbers in order
I am trying to write a constraint in an XLS form for a survey which allows 3 letters, then 5 numbers, i.e. ABC12345.
I have gotten to allowing 3 letters and 5 numbers, but it does not require them to be in the correct order (i.e. A1B2C345) with the following code: . = regex ( ., "^[A-Z,0-9]{8}$")
How do I write the constraint so that all letters must be first, followed by numbers?
Hi megan
Did you find the solution !! If yes could you help me i need it 2 ...
Regrads,
khamash
···
On Friday, August 1, 2014 6:52:38 PM UTC+2, Megan wrote:
>
> I am trying to write a constraint in an XLS form for a survey which allows
> 3 letters, then 5 numbers, i.e. ABC12345.
> I have gotten to allowing 3 letters and 5 numbers, but it does not require
> them to be in the correct order (i.e. A1B2C345) with the following code: .
> = regex ( ., "^[A-Z,0-9]{8}$")
> How do I write the constraint so that all letters must be first, followed
> by numbers?
>
> Thank you!
> Megan
>
>
Yes, William responded with the following which worked: [A-Z]{3}[0-9]{5}
Best,
Megan
···
On Wed, Oct 22, 2014 at 4:02 AM, abdallah khamash wrote:
Hi megan
Did you find the solution !! If yes could you help me i need it 2 ...
Regrads,
khamash
On Friday, August 1, 2014 6:52:38 PM UTC+2, Megan wrote:
I am trying to write a constraint in an XLS form for a survey which
allows 3 letters, then 5 numbers, i.e. ABC12345.
I have gotten to allowing 3 letters and 5 numbers, but it does not
require them to be in the correct order (i.e. A1B2C345) with the following
code: . = regex ( ., "[1]{8}$")
How do I write the constraint so that all letters must be first, followed
by numbers?