Regex for xls form

Hey Everyone,
Iam new to ODK and i am making my first xls form and i am stuck.I want to add regex for the website in my xls form that should allow the user to write http,,.tv,.in. Right now i am using the regex: regex(.,'[a-zA-Z0-9]+.[a-zA-Z]+(.?[a-zA-Z0-9#]+/?)'), but it is allowing but not etc. Please help.

Thank You

where you want to add this in your xml form.

Introduce your self here : Introduce yourself here!


Are you just trying to regex against domain names?

This is non-trivial, but there's a lot of resources for this if you start looking around.
For example:
A preview of the Domain Name chapter of Regular Expression Cookbook
An example domain name regex, with debugging info

I always use when I am building regular expressions. You can put all your test cases in the field below and then see what matches and what doesn't. (Be sure to include some counter-examples in your test cases.)

One thing to keep in mind, depending on your context, is that domain names can contain non-ASCII characters, including characters in nearly every international alphabet and even emoji.


Try this:


Lifted from here

Thank you so much for the reply, but still it is not taking http://,https://.

Ah. So are you trying to match domain names (e.g. "") or simple URLs (eg, or complex URLs (eg Or something else entirely?

"http" is a protocol. ".tv" and ".in" is - I suspect - intended to be a top-level domain name. And "" rather falls into the bucket of 'something else entirely'... :confused:

I think you need to explain what exactly it is that you are trying to match against.