Select to view content in your preferred language

Regular expression for a person's height

867
2
06-11-2020 12:58 PM
ryanEvanczyk
Frequent Contributor

I used an online regex checker and I've got what I want to work, but it won't work when I put it into my form via survey 123 connect.

regex(.,'^(\d)\'(([0]\d)|([01][01])|(\d))\"$')

I've had a similar issue before and simply retyping it vs copy/paste solved the issue, but not this time.

I'd like the examples 0'11", 9'11", and 9'1" to all be valid.

Thanks for the help,

RyanE

Tags (1)
0 Kudos
2 Replies
DougBrowning
MVP Esteemed Contributor

You could use 2 fields then you could check for like 4-6 on feet and 0-12 in inches as well.  Can then combine them after in a 3rd field.  

Just an idea.

ahargreaves_FW
Frequent Contributor

I too am struggling with this. I'm using:

regex(.,'^([1-8]')?\s?([1-9]|1[01])$')

@IsmaelChivite , @JamesTedrick  any insight?

0 Kudos