How to Use Type-Ins Effectively


On JetPunk, we have what's called type-ins. These use regular expressions to pattern-match what the user has entered into the text box against set expressions. For example, the expression might simply mean "type DOG exactly", so the user would have to type in the word "dog".

At this point it would be good to mention that JetPunk is not case sensitive, meaning that "AlpHa" is considered the same as "aLPHa". This is useful since we don't have to distinguish between capital letters and lowercase.

When creating type-ins, for many answers an automatic type-in will be loaded by default. This is mainly for common answers like Countries, Cities or States, though there are many others on there also. If it is not one of these common answers, then JetPunk will simply suggest a type-in base on the letters, such as a "y" at the end of a word will have the type-in "(EE|EY|IE|Y)" suggested. We'll go through what that means later.

Simple Type-Ins

There are many simple ways to add type-ins to JetPunk answers. For each answer, you are presented with three options: "Auto", "Custom" or "Exact".

  • Auto will use the automatic type-in if available or the suggested type-in otherwise.
  • Custom allows you to add your own type-ins.
  • Exact requires the exact word to be inputted, with no suggested type-ins applied.

Since the other two have no customisations, only Custom is worth discussing in detail. When selecting Custom, you'll notice 4 options appear at the bottom of the box:

  • + Starts - this is the default option, it allows you to decide what the user must start answers with when typing in. E.g. setting this to "CHINA" means that the user must start their answer with the text "china" to be accepted as an answer.
  • + Ends - this is similar to above, except this requires to ending of the typed guess to be something specific. E.g. setting this to "EVEREST" means that the user's guess ends with that, so "everest" and "mounteverest" would both be accepted.
  • + Contains - this options allows you to accept guesses containing a specific string of characters. A commmon example of this is "CONGO", which will accept any answer which contains the word "congo" in it somewhere.
  • + Regex - this allows the full customisation, it is discussed in complete detail below.

Overall, getting started with type-ins is pretty easy, but actually making type-ins which match against many possible guesses is more useful. For example, you'll never be able to add every possible misspelling of Kyrgyzstan using the first 3 above, for that we need some more powerful tools.

Type-Ins using RegEx

RegEx is short for Regular Expression and refers to a near-universal tool in programming that allows you to pattern match text against cases. We will use a simplified version, since many of the features of RegEx are not useful or available on JetPunk. For example there are characters used to pattern-match on some symbols, but this is useless since the answer-box on JetPunk accepts only alphanumeric input (letters and numbers).

There are 4 different "tokens" that are useful to us:

  • Character Classes
  • Anchors
  • Quantifiers and Alternation
  • Capturing Groups

We will go through what each one does, with examples, and then combine them together at the end.

Character Classes

Character Classes define a set of characters to be matched against. These are defined using square brackets [ ]. On their own, they will only match against one letter at a time within the letters between the brackets, called the class.

  • [ABC] - this alone will match any answer which contains an A, B or a C
  • F[OEU]D - this will only match when FOD, FED or FUD is entered, since [OEU] only matches against one character (we'll see later with Quantifiers how to increase this)
  • [A-G] - you can also use a dash inside to allow it pattern match against any letter between A and G
  • [0-7] - this ranging feature also works with numbers
  • [AE][FG] - these character classes can be placed next to each other too, this will match when AF, AG, EF or EG is entered


Anchors are used to define where we should match against. There are technically 3 anchors that we use:

  • ^ - this at the start of a type-in to signify that we want our answer to "Start with" whatever we want
  • $ - this goes at the end of a type-in to signify that we want our answer to "End with" whatever we want
  • Although this last one is a bit weird, it's actually the absence of ^ and $, which means we want our answer to "Contain" whatever we wish.

You'll notice these 3 options line up with the JetPunk options mentioned above in the Simple Type-Ins section. The downside to using those 3 options is that you can't use any other Regex within them, only plain letters and numbers.

  • ^FOOD - this means we want our answer to start with "FOOD", this is the normal type-in for answers, since it's just matching against you typing in the answer
  • ING$ - this will activate whenever anything typed into the text box ends with "ING", e.g. "ing", "thing" or even "abfgvsbfoanfubding"
  • INSIDE - this will match any answer which contains the word INSIDE, e.g. "inside" or "whatinsideme" although the second you wouldn't be able to type in 'me' since it will activate the answer against "whatinside"
  • ^A[CLN]T - this matches against any answer starting with "act", "alt" or "ant"

I think this gives you an idea of where you could go. It's easy to see that using a ^ and $ in the same answer would be rather pointless in JetPunk's case.

Quantifiers and Alternation

There are 3 main tokens here which are useful for JetPunk and one additional one which is possible to use, but I can't see a use for it particularly.

  • + - the plus symbol matches against 1 or more of the preceding token (can be characters or most other tokens)
  • ? - the question mark is, suitably, used to match against 0 or 1 of the preceding token. Particularly used to denote optional characters in a type-in
  • | - this is the vertical line character called alternation. This acts like a boolean OR operation, meaning it will match the expression before or after the |. It can act on a single group, or on a whole expression

The extra one is *, which matches against 0 or more of the preceding token. Which is plausible to use, but as I mentioned I can't think of a practical use for it.

  • ^FO+D - this means we start with "fo" and then can have any number of o's in the middle, e.g. "fod", "food" and "fooooood" all work
  • ^PHILIPP?INES - the original type-in for the Philippines, which allows you to type either 1 or 2 P's, since the second P is optional
  • ^MYANMAR|^BURMA - this is using an alternation on the whole expression, and will match an answer when it starts with either "myanmar" or "burma", this is particularly useful for "by borders" quizzes when you run out of type-in boxes (maximum of 10 are allowed)
  • ^MAI?N+E - this has an optional "I" and allows 1+ "N"s, so "mane", "maine" and "mainnnnne" will all activate this type-in
  • J[OU]+LE - this is a particularly useful combination, since this will allow the token "[OU]" as a whole 1+ times, meaning for this we can match against "JOLE", "JULE", "JOULE" or even "JOUUOUOUOULE"! This comes in handy when you have hard-to-spell words which users may need help with (see next example)
  • ^K[IY]RG[A-Z]+STAN - the famous type-in for Kyrgyzstan! This allows any word which starts with K, is followed by an 'I' or 'Y', then an "RG", then the fun bit - any number of letters of the alphabet (at least one) - then finally a "STAN". This means that "KYRGASTAN" and "KIRGVDAUIHDUGAVUDYIHAGDVSTAN" both activate a Kyrgyzstan answer on JetPunk. CAUTION: This "[A-Z]+" combination should be used sparingly, otherwise it may end up accepting answers you did not want it to

Some combinations are not valid, such as ?+ since this logically does not make sense, also +? is valid, but does nothing different to + anyway.

An example of that star token mentioned would be ^MI*NE which allows matches such as "MNE", "MINE" and "MIIIIIINE", since these all contain 0+ I's in the middle. Again this can be done in JetPunk, but I've yet to find a practical example for it.

Capturing Groups

Lastly, capturing groups utilise normal parentheses ( ) to group characters or tokens together. This means you can apply all the previous tools to create any type-in you wish now.

  • ^M(OU|UO)LD - this uses an alternation to match against "ou" OR "uo", so "mould" and "muold" are both accepted. These are used in abundance of type-ins to provide alternative spellings, especially with words ending in "LY"
  • ^MAD(MAN)?ME - this uses an optional on an entire capture group, meaning that only answers starting with "madme" and "madmanme" are accepted here
  • ^J[AEIOU]T+PUN?K - getting a little more complex here, now allowing the second character to be any vowel, as well as then allowing 1+ T's afterwards and an optional on N. So "jetpunk", "jutttpuk" and "jatpuk" are all valid for this type-in
  • ^(SAINT|ST)?H[AE]R+[AEIOL]+S+[EO]N - this looks rather complex, so let's break it down into parts:
    • ^(SAINT|ST)? - this is a particularly useful combination for answer which may or may not have a prefix, this will accept any answer that start with "saint" OR "st", or it will accept if this is ignored entirely too thanks to the optional outside the capture group.
    • H[AE]R+ - this part requires a "h" followed be a single "a" or "e", then followed by at least one "r".
    • [AEIOL]+S+[EO]N - this final part takes at least one letter from "A", "E", "I", "O", "L" (i.e. can be any number of these in combination, as long as there's at least one of one of them), followed by 1+ S's, then a single E or O and finally an N.

Possible matches to that last example are "harasen", "st heroileaoson" or perhaps "saint harrrrrroioieoloieaesssssen".

As you can see, in combination these can be very powerful tools which can provide very useful type-ins for for quiz-makers and quiz-takers.

What's the point?

The point of type-ins is to provide an easier way to match against possible user answers. Yes, it's possible to just type every possible spelling somebody may input as the answer, but what if you miss somebody's way of misspelling? And why do that when we can simplify them?

If we go back to our example of Kyrgyzstan:


This type-in does wonders since nearly everybody spells Kyrgyzstan incorrectly in a different way at some point. This type-in was made by stripping it back to what it needs to be the word Kyrgyzstan, which means it needs to start with K, then either I or Y followed by RG. We also want it to end with STAN, which all gets combined to produce the type-in shown above.

Finally, many users appreciate when a quizmaker puts effort into type-ins, since this makes it a more pleasant quiz to take, especially when some of the answers come from other languages or can be simply strange in spelling or formation.

Also, if you'd like to explore RegEx further outside of JetPunk to practice or otherwise, RegExr is an excellent tool for getting to grips with all the terminology and features. It is also useful for testing the more complicated type-ins!

Level 75
Jul 4, 2019
Very clear. Thanks!
Level 74
Jul 4, 2019
Very educational. Thanks!
Level 66
Jul 5, 2019
What a great blog, should of commented earlier :P
Level 31
Jul 7, 2019
Learned a lot from this. thanks
Level 67
Apr 15, 2020
I'm going to start typing 'kyrgkqhbhjfbahbnaaqnmstan' now thanks!
Level 53
Apr 13, 2021
Level 55
Oct 15, 2020
what about for an by clue quiz
Level 55
Dec 7, 2020
What should I do for a quiz with many correct answers for one question? You can only have up to ten regexes I'm pretty sure.
Level 68
Dec 7, 2020
You can have ten lines, correct, but you can combine regex into a single line, see the myanmar / burma combination in the blog above. Simply put | (vertical line) between each regex, ensuring you have ^ (meaning starts with) each time!
Level 57
Mar 31, 2021
Omg thank you. Im trying to make a category elimination quiz and that helps so much
Level 34
Jan 11, 2021
How do you make it so one of the answers are already there
Level 68
Jan 11, 2021
If you mean a "fill in the blank" like lyrics quizzes, this can be done by surrounding text you want to be visible always by { } in Step 2. For example, doing "{Jet}Punk is {the} best" in Step 2 would show "___Punk is ___ best" and the typeins would automatically change to "JETBEST"
Level 34
Jan 26, 2021

I mean when you do a country quiz and its on Europe and you want Cyprus or Azerbaijan already there so no one complains

Level 54
Apr 25, 2021
See Stewart's reply to @anonimous down below
Level 58
Feb 3, 2021
How do you do so an answer appears automatically when one opens the quiz (Example: Answers to avoid confusion)?
Level 68
Feb 3, 2021
If you mean like the Congos on the "countries starting C" quiz, you don't want these in Step 2. Step 2 is only for answers that should be typed. All others can be added in Step 4.

Simply switch the design mode in step 4 to "manual", and then options to add rows and columns to each block appear, so you can add a new row, type in the pre-filled answer, and then style that row / cell however you'd like (e.g. fill it grey).

Level 56
Feb 5, 2021
Technically, Philippines is the country's actual name

[I would know, I was born there ;)]

Level 23
Mar 4, 2021
Thanks a lot for these instructions!

It was very useful for me ^^

Level 42
Mar 20, 2021
thank you! but what if i want to make a ''how many times can you type'' quiz?
Level 54
Mar 29, 2021
use the yellow box (the option to do this is in step 1)
Level 57
Mar 31, 2021
You can use the * for abbreviations like DRC
Level 42
Jan 18, 2022
how to do it if the answer consists of 2+ words in ANY order?

Like if to accept both "mad cow" and "cow mad".

Is (COWMAD|MADCOW) the only option?

Level 68
Jan 18, 2022
Yes, unfortunately this is the only option if you want both to be typed.
Level 22
Mar 27, 2022
Now I can make quizzes with 10+ Type-ins!
Level 29
May 5, 2022
I'm trying to make a quiz, which uses regex. My first thing is:

word that starts with n

When I try to do that, just typing n enters it in correctly. How do I fix it?

Level 68
May 5, 2022
the only way to prevent that is to force other characters to be typed. For example, if you want "5 letter word starting with n" you could do:


However, this would allow "NNNNN" as a word, which may not be what you want.