Hi everyone! I've been searching here and elsewhere for a solution to my problem but all my attempts at resolving it myself have been fruitless. I have a form that collects many measurements and want to force users to enter them the same way each time and across users.
I would like all measurements to be in feet and inches. Example: 1'-9" or 12'-11" or 100'-2"
I have tried regex but all my attempts throw a parse error when I get to Nafundi's xlsform Offline. I have found code on stackoverflow that validates in regex101 but will not pass the validate. Please help!
I started with ODK Build (v0.3.3?) and exported to xls and edited there (on Win7 x64)
We use Collect v1.16.2 on Android 7 tablets.
I have kept logs of all I have tried with regard to regex. Here are my attempts:
--regex log--
first attempt - failed parse: regex(., '[0-9]{1,2}['][-][0-9]{1,2}["]')
code from stack: ^(?!$|.'[^\x22]+$)(?:([0-9]+)')?(?:([0-9]+)\x22?)?$ - didn't include a hyphen separator
edited for xlsform: regex(^(?!$|.'[^\x22]+$)(?:([0-9]+)')-) - failed parse
attempt 2: regex(., '(?!$|.'[^\x22]+$)(?:([0-9]+)')-') - failed parse
attempt 3: ^(?!$|.'[^\x22]+$)(?:([0-9]+)')[-](?:([0-9]{1,2}\x22?)$
attempt 4: regex(, '^(?!$|.*'[^\x22]+$)(?:([0-9]+)')-
link to original edited regex - https://regex101.com/r/mL8fD7/26
I don't see a way to attach my xls or screenshots.
Thank you in advance for the help!!