Discord large text generator Input:

The input will be a string of any characters.

Output:

the output will be an emojified (discord emojis) version of the input string. The way it will work is as so:

Letters: a-z (case insensitive) will become ':regional_indicator_lowercase letter here:'

e.g 'A' will become ':regional_indicator_a:'

Digits: any digits (0-9) will become the word version of the digit like so ':digit:'

e.g '0' will become ':zero:'

Whitespace: any whitespace character that's matched with the regex: /\s/ will become ':white_large_square:'

e.g ' ' will become ':white_large_square:'

Important notes:


The ':' surrounding the emoji's are necessary or else it won't display correctly in discord.
Each emoji needs to be separated by 1 space or else it won't display correctly in discord.
Trailing whitespace is allowed in the final output.
Any other characters that it comes across should not be in the final output and will be ignored.


Examples:

#1: Input:

this is a test string 0123456789


output:

:regional_indicator_t: :regional_indicator_h: :regional_indicator_i: :regional_indicator_s: :white_large_square: :regional_indicator_i: :regional_indicator_s: :white_large_square: :regional_indicator_a: :white_large_square: :regional_indicator_t: :regional_indicator_e: :regional_indicator_s: :regional_indicator_t: :white_large_square: :regional_indicator_s: :regional_indicator_t: :regional_indicator_r: :regional_indicator_i: :regional_indicator_n: :regional_indicator_g: :white_large_square: :zero: :one: :two: :three: :four: :five: :six: :seven: :eight: :nine:


#2: input:

!?#$YAY 1234


output:

:regional_indicator_y: :regional_indicator_a: :regional_indicator_y: :white_large_square: :one: :two: :three: :four:


#3: input:

lots         of         spaces


output:

:regional_indicator_l: :regional_indicator_o: :regional_indicator_t: :regional_indicator_s: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :regional_indicator_o: :regional_indicator_f: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :white_large_square: :regional_indicator_s: :regional_indicator_p: :regional_indicator_a: :regional_indicator_c: :regional_indicator_e: :regional_indicator_s:


Examples as shown in discord:



This is codegolf so the shortest code wins!
Python 2, 275 268 267 bytes

d=['']*256
d[48:58]='zero one two three four five six seven eight nine'.split()
d[9]=d[10]=d[32]='white_large_square'
d[65:90]=d[97:122]=map(lambda c:'regional_indicator_'+chr(c),range(97,122))
print' '.join((':%s:'%d[ord(c)])*(d[ord(c)]!='')for c in input()).strip()


It creates a large list of strings, iterates through the input string's characters and gets the string from the list using the character's ord value.
Works for ascii characters only. Replaces space, tab and newline only; any other whitespace will be discarded.

It did leave whitespaces in front so I had to strip it in the end.

I also tried doing it with regex, turned out to be longer (286 bytes):

import re
print re.sub('([ \t\n])|([a-z])|(\d)',lambda m:':'+['white_large_square','regional_indicator_'+m.group(m.lastindex),'zero one two three four five six seven eight nine'.split()[(ord(m.group(m.lastindex))-68)%10]][m.lastindex-1]+': ',re.sub('[^a-z0-9 \t\n]','',input().lower()))