Q:

How can I write regular expression for android:host

I have multiple hosts, for example:

example1.myhost.abc
example2.myhost.xyz
example3.myhost.jkl

I want to write a regular expression for host name in the data attribute of intent filter. Which may look like this:
<data
android:host=".*myhost.*"
android:scheme="http"/>

But its not working for me. It seems that android:host does not support regex. Is there any way to achieve it?

A:

It seems that android:host does not support regex.

Correct.

Is there any way to achieve it?

You can say that you handle the http scheme and not specify anything else (e.g., no host, no path). This will cover all your desired patterns, but it will also cover every other domain name.
Or, since you can have more than one <data> element, you can have as many host attributes as needed to cover all of your sites, without regular expressions.

