Quick RegEx (Regular Expressions) guide in case you are not familiar with using them!
You may have noticed that game inputs include quite a few "coded" characters, typically a backslash \ followed by a letter, with some parentheses and colons along the way. These are called regular expressions and they are used as variables in the game so that players can say either "" and both of those answers would be accepted in the game.
The first one you meet is \n which is a newline, i.e. the end of a line of text and return to the next line, e.g. typing two\nwords will display the text
two words
Now it gets complicated because the regex can be combined - using (parentheses) allows you to isolate regular expressions from one another, and using a quotation mark ? allows you to make text optional, so if I want the text "big blue fish" but "big blue" is optional then I will type (big blue)?fish but let's say I want both big and blue to be optional so that the input would be (big)?(blue)?fish so here both bigfish and bluefish would be acceptable displays, as well as bigbluefish.
Which brings us to \s the whitespace character, i.e. a typographical space - when inputs include multiple words you probably want them to be separate so here bigbluefish should probably big blue fish, then you will add \s to your text to enforce the space. BUT you also want the game to recognize that the \s is RegEx that is combined with text, or else typing (big\s)?(blue\s)?fish would give you the display big\sblue\sfish. You will then need to escape the Regex with another \ e.g. (big\\s)?(blue\\s)?fish so that the display would be big fish or blue fish or big blue fish. You will notice the game uses the + symbol here to make sure that a user can enter one or more spaces without getting penalized so (big\\s+)?(blue\\s+)?fish allows the answer big blue fish.
If you are working in a language with marked cases, then you will definitely need to use RegEx to accept singular or plural answers: so you will put the acceptable endings in their own block using (parentheses) then start the string with a question mark? to indicate an optional ending followed by a colon: with the acceptable endings, e.g. ending(?:s) would accept either ending or endings as an input.
The vertical bar | marks alternatives, so if you have a question where the answer could be blue OR red OR orange OR yellow then you will use blue|red|orange|yellow. This also works for alternative endings , e.g. ending(?:s|a|u) would accept either ending or endings or endinga or endingu as an input.
You'll meet a handful of other RegEx bits such as (.+) which means any text, but you can generally leave those alone!