Dear Team,
I am using this regex for my patient id, regex(., ‘[1]{3}[ABCD]{1}-[0-9]{3}$’)
However, I want to fix ISP for data collectors. Please guide me how to do that?
ISP ↩︎
Dear Team,
I am using this regex for my patient id, regex(., ‘[1]{3}[ABCD]{1}-[0-9]{3}$’)
However, I want to fix ISP for data collectors. Please guide me how to do that?
ISP ↩︎
Hi @Priyanka,
What do you mean by ISP? The internet service provider?
Thats a code for the institute. I don’t want team to put IPS or SSP etc
@Priyanka, do you mean they should only be able to input ISP
in uppercase for a text question
type?
Hi Kalyan!
So I want my data collector to put such inputs
ISPA001
ISPB002
ISPD003
ISPC004
So basically the ISP is fixed in the input.
@Priyanka, so you mean the entry should be in the following format?
ISP
.integer
.Is this what you want?
Yes, ISP is fixed then forth is uppercase A or B or C or D and rest is 3 digit integer.
@Priyanka, if this is the requirement, then try using this regex code (it should solve your issue):
regex(., '^(ISP)[A-D]{1}[0-9]{3}$')
You should also be able to learn more about regex code through this support article Restricting Text Responses With Regular Expressions.
Its is solved now. Thank you so much Hakan and Kalyan!