Template:Welcome needed/user

Generates one Cirrus intitle search term to help distinguish registered users from anon users based on the title of the User talk page.
Usage
{{Template:Welcome needed/user|token}}
Parameters
There is one required positional parameter:
|1=
– a token specifying the type of user search desired, having one of the following values:reg
: users with a registered accountIPv4
: unregistered users with an IPv4 accountIPv6
: unregistered users with an IPv6 accountanon
: unregistered users
Examples
{{Welcome needed/user|IPv4}}
→ intitle%3A%2F%3C1-255%3E%5C.%3C1-255%3E%5C.%3C1-255%3E%5C.%3C1-255%3E%2F{{Welcome needed/user|IPv6}}
→ intitle%3A%2F%5B0-9%2Ca-f%2CA-F%5D%7B1%2C4%7D%5C%3A%5B0-9%2Ca-f%2CA-F%5D%7B1%2C4%7D%2F{{Welcome needed/user|anon}}
→ intitle%3A%2F%5B0-9%2Ca-f%2CA-F%5D%7B1%2C4%7D%5B%5C.%5C%3A%5D%5B0-9%2Ca-f%2CA-F%5D%5B%5C.%5C%3A%5D%7B1%2C4%7D%2F{{Welcome needed/user|reg}}
→ -intitle%3A%2F%5B0-9%2Ca-f%2CA-F%5D%7B1%2C4%7D%5B%5C.%5C%3A%5D%5B0-9%2Ca-f%2CA-F%5D%5B%5C.%5C%3A%5D%7B1%2C4%7D%2F
Technical note
Results are based on Cirrus regular expressions. Shortcuts are taken in the code for performance, so results may not be perfect, in cases of usernames designed to mislead. For example, a registered account that starts out with three hex values up to four characters each and separated by colons followed by alphabetic characters and thus looking like an IPv6 address in the first part of the name will be identified as an IPv6 user. This should probably not matter, as such misleading user names might be challenged based on username policy. If needed, the IPv6 regex can be strengthened to eight hex groups so it only matches actual IPv6 addresses. The same thing is true for identifying IPv4 users, and anything that doesn't look like either one is identified as a registered account.