You are here

Creating Quiz Questions

Common Setup Options

The Quizzes tool comes with a comprehensive set of question types that you can include in your assessments. When creating questions, you’ll notice similar options appearing across different question setup pages. Many question setup pages will include:

  1. An optional Title field. If you do not enter a title, the system will take the full question text and enter it as the title. The title is only displayed in the quiz tool and not to users taking the quiz.
  2. A field to determine how many Points the question is worth.
  3. A drop-down menu to rate the Difficulty of the question.
    Quiz title field
  4. A field to enter the Question Text.
  5. The option to Insert an Image.
    1. Inserting an image will enable the option to add a description for the image.
      Quiz question text
  6. An Enumeration drop-down menu for question types listing multiple possible responses. This option determines how the items will be listed. 
  7. Several Style options. However, we recommend keeping the default value (Vertical).
    Quiz question enumeration setup
  8. An option to enter hints for the question. Click on Expand question hint to display the field.
  9. An option to enter feedback for the question. Click on Expand question feedback to display the field.
    1. Note: There are several features available within open fields such as inserting media, creating tables, inserting equations, and spell check. However, you mouse over any button in an open field for a description of its function.
  10. An option to preview the question. Click Preview at the bottom of the page to view your question as it will appear during use and grading.
  11. Click Save to save the question and return to the main page; Save and Copy to save the question and create a new question of the same type and that retains the copied properties; or click Save and New to continue creating questions of the same type.
    Quiz setup save

Setting Up Specific Question Types

After setting up some of the options detailed in the Common Setup Options section, you will need to set up how the responses are formatted and scored in that particular question type. After making any changes, remember to click Save to apply your change.

True or False Question (T/F)

The table where you can format True or False responses is broken up into four columns:

  1. The number of possible responses to the question. True or false questions are always limited to the two options.
  2. How the response is written is referred to as the Value of the response. For this question type, the values will always be set to True and False.
  3. The Weight (%) of the response determines what percentage of the determined point value for the question the user will score if they select that response. For example, if the question is worth 1 point and you set the Weight of the True response to 100(%), then they will score the full point for answering True.
  4. You can enter optional Feedback that users will see for submitting that response.
    True False question setup

Multiple Choice Question (MC)

The table where you can format Multiple Choice responses is broken up into five columns:

  1. The number of possible responses for the question.
    1. The default for Multiple Choice questions is four options, but you can add more by entering a number into the field next to Add Option and clicking +.
  2. How the response is written is referred to as the Value of the response. For example, if the question was ‘What color is Mars?’ the Values of the possible responses could be ‘Blue,’ ‘Yellow,’ ‘White,’ and ‘Red.’
  3. The Weight (%) of the response determines what percentage of the determined point value for the question the user will score if they select that response. For example, if the question is worth 1 point and you set the Weight of a response to 100(%), then they will score the full point for answering that response. In most cases for this question type, you will set one response to 100, but if you would like to give partial credit, you can adjust the percentage accordingly. In the scenario where the question is worth 1 point, you could set one of the responses to score for half of a point by setting the weight to 50.
    Multiple Choice question details part one
  4. You can enter optional Feedback that users will see for submitting that response.
  5. You can delete any option by clicking the trash can icon.
    Multiple choice question details part two

You can also have the system randomize the responses for each user by checking the box under Randomize options.

multiple choice question randomize option

Multi-Select Question (M-S)

The table where you can format Multi-Select responses is broken up into five columns:

  1. The number of possible responses for the question.
    1. The default for Multiple Choice questions is four options, but you can add more by entering a number into the field next to Add Option and clicking +.
  2. How the response is written is referred to as the Value of the response. For example, if the question was ‘What color is Mars?’ the Values of the possible responses could be ‘Blue,’ ‘Yellow,’ ‘White,’ and ‘Red.’
  3. You can check any number of boxes under the Correct column to determine which response(s) are right. At least one box needs to be checked for the item to be auto-graded.
    Multi select question details part one
  4. You can enter optional Feedback that users will see for submitting that response.
  5. You can delete any option by clicking the trash can icon.
    Multi select question details part two

You have three options for how you wish to grade a Multi-Select question.

  1. All or nothing: A user needs to submit all of the right options to score full points. Otherwise, the user will score a 0.
  2. Right minus wrong: Each wrong answer submitted will subtract from each right answer submitted.
  3. Correct answers: Users will score partial credit for each correct answer they submit (no deductions for wrong answers).
    Multi select question grading options

You can also have the system randomize the responses for each user by checking the box under Randomize options.

Multi select question randomize option

Written Response Question (WR)

The Options section for Written Response questions is broken up into: adjusting the Input Box, entering Initial Text for user responses, and writing and Answer Key for your personal use.

  1. By default, the Input Box is set to 5 Rows by 80 Columns. Feel free to make any adjustments, but it’s recommended to you leave the default values.
    Written Response Input fields
  2. You can enter Initial Text that will automatically appear in the user’s Input Box when they are looking at the question.
    1. You can enable the HTML Editor to be used for responses by checking the appropriate box, although we recommend leaving this unchecked. 
      Written Response initial text box
  3. You can write up an Answer Key for the question that only you will be able to see. 
    Written Response Key

Short Answer Question (SA)

  1. By default, each Short Answer question comes with a single blank field for users to enter their responses which are represented by Blank #1 in the editor.
    1. You can add additional blank fields by entering a number next to the Add Blank field and clicking +.
  2. You can adjust the size of the field by changing the Rows and Columns values. However, we recommended leaving these values at their default values.
    Adjusting short answer question field size
  3. Under the Answer column, enter the correct response to the question.
  4. Under the Evaluation column, you can determine whether you would like to enforce a case restriction when automatically grading the response. Please see Understanding Regular Expressions section for more information on that feature.
  5. The Weight (%) of the response determines what percentage of the determined point value for the question the user will score if they enter that response correctly. In most circumstances where there is only one correct response, you would enter 100 into the field (i.e., if they answer correctly, they get full credit). If you add more answers, you can account for partial credit by adjusting the weight appropriately (e.g., entering 50 would count for half credit).
    Short Answer answer fields
  6. To add more possible answers for a particular field, enter a number into the field next to Add Answer and click. You can click Check Answers to see a full list of all acceptable answers for that field and review whether the system flagged any of those responses for errors.
    Add Short answer
  7. You can remove answers or blank fields by clicking the trash can icon under theRemove column of the respective areas.

Multi-Short Answer Question (MSA)

The table to format answers for this question type is broken up into five columns:

  1. The number of possible answers to the question.
    1. You can add more answers by entering a number into the field next to Add Answer and clicking +. You can also click Check Answers to look at the list of acceptable answers and review whether the system flagged any of those responsible for errors.
  2. Enter your answers in the fields under the Answer column.
  3. The Weight (%) of a response determines what percentage of the determined point value for the question the user will score if they enter that response correctly. By default, three possible options are equally distributed in weight (each correct response scores a third of a point) although you can adjust this as you see fit.
    Add answer, multi short answer
  4. Under the Evaluation column, you can determine whether you would like to enforce a case restriction when automatically grading the response. We recommend not enabling Regular Expression since the feature is intended for advanced purposes.
  5. You can delete any option by clicking the trash can icon.
    Multi Short Answer Evaluation and Removal options

You can adjust how many Input Boxes users will have available for the answer. You can also adjust the size of the Input Boxes by adjusting the Rows and Columns although we recommend keeping both of these values at their default values. 

Add input boxes fields

Fill in the Blanks Questions (FIB)

The table to format answers for this question type is organized by Text # and Blank #. Think of the structure of a standard fill in the blank question following this format: “Fill ______ blank” where “Fill” would be Text #1, “____” would be Blank #1, and “Blank” would be “Text #2.”

  1. For Text # fields, enter the portions of the statement.
    Text fields
  2. For Blank #, enter the correct answer. 
  3. The Weight (%) of the answer determines what percentage of the determined point value for the question the user will score if they enter the answer correctly. If there is only one possible answer, set this to 100.
  4. Adjust the size of the field by setting the number via the Size drop-down menu. We recommend keeping it at 30.
  5. You can add more answers by entering a number into the field next to Add Answer and clicking +. You can also click Check Answers to look at the list of acceptable answers and review whether the system flagged any of those responsible for errors.
    Add more answers
  6. Under the Evaluation column, you can determine whether you would like to enforce a case restriction when automatically grading the response. Please see Understanding Regular Expressions section for more information on that feature.
  7. You can delete any option by clicking +.
    Evaluation and Removal options
  8. You can add blank or text fields by entering a number next to the appropriate field and clicking +.Note: There is no way to adjust the order of Text # and Blank # fields. Be sure to add to fields keeping the strict order in mind.
    Adds Blank and Text Fields

Matching Question (MAT)

This editor is divided into two sections: Choices and Matches. Match items are static and will display with drop-down menus beside them that will bring up a list of each Choice.

  1. Both the Matches and Choices sections include tables where you can enter the items under the Values column.
    Enter Values field
  2. The Matches section includes a Correct Choice column where you can select which Choice Value is the correct answer for each Match Value. 
    Determine Matching options
  3. You can add choices and/or matches by entering a number in the respective fields and clicking +.
    Add matchadd choice
  4. You can delete any option by clicking the trash can icon.
    Delete option
  5. The Grading section gives you three options:
    1. Equally weighted: Each matching pair will be divided evenly based on the number of points the questions is worth.
    2. All or nothing: Users need to get all of the matches correct to score the points for the question.
    3. Right minus wrong: Everyone wrong match will subtract from every correct match.
      Grading section

Ordering Question (ORD)

The table to format the answer is divided into 5 columns:

  1. The number of the item included in the list.
    1. You can add more items by entering a number into the field next to Add Item and clicking +.
  2. The item is referred to as the Value. Each row comes with a field for you to write out the item.
  3. The Correct Order column includes a drop-down menu where you can select where in the order that item belongs.
    Ordering questions steps one through three
  4. You can enter optional Feedback that users will see for submitting that response.
  5. You can delete any option by clicking the trash can icon.
    Ordering questions steps four and five

The Grading section gives you three options:

  1. Equally weighted: Each matching pair will be divided evenly based on the number of points the questions are worth.
  2. All or nothing: Users need to get all of the matches correct to score the points for the question.
  3. Right minus wrong: Everyone wrong match will subtract from every correct match.
    Grading options

Arithmetic Question (2 + 2)

The Arithmetic question type is a great way to present unique questions to each user. Numbers can be randomly chosen for each variable in the question based on specified number ranges.

  1. Type the formula that you use to calculate the correct answer in the Formula field. Make sure that you enclose all variables in curly braces { }. For example: ({x}+{y})/4
    1. Click the Test button to test your formula. A new page will display containing an example of your formula.
      Formula Bar
    2. The following constants are supported:
      1. PI 3.14159 (accurate up to 50 decimal places)
      2. e 2.71828 (accurate up to 50 decimal places)
    3. The following functions are supported in the Formula field:
      Enumerations Description

      +,-,*,/,\,^,%

      Basic mathematical operators

      {x}^{y}

      x to the power of y

      abs({n})

      Absolute value of n

      cos({n})

      The cosine of n (in radians)

      sin({n})

      The sine of n (in radians)

      sqr({n})

      The square root of n

      tan({n})

      The tangent of n (in radians)

      log({n})

      The log base 10 of n

      ln({n})

      The log base e of n

      atan({n})

      The inverse tangent of n

      sec({n})

      The secant of n

      cosec({n})

      The cosecant of n

      cotan({n})

      The cotangent of n

      Factorial

      Factorials

      exp

      The power of natural log (e)

  2. Select a number from the Answer Precision drop-down list to define the number of decimal places answers must be accurate to. Enforce precision by checking the appropriate box.
    Answer Precision options
  3. Type a Tolerance value and choose either Units or Percent to define how accurate answers must be. 
    1. For example, a tolerance of 3% would allow answers to be off by 3%, or a tolerance of 5 units would allow answers to be off by 5 units (units are defined in the field below).
      Answer tolerance options
  4. Type the unit that the answer to the question should be in (if any) in the Units field (for example, MPH, meters, inches, etc.).
    1. Check the case-sensitive Evaluation Option if the unit is case sensitive.
    2. If you want to assign points for using the correct unit in an answer, choose a percentage value from the Worth drop-down list.
      Units options
  5. In the Variables section, define all of the variables you used in the Question Text.
    1. To add more variables, enter a number in the field next to Add Variable and click +.
    2. The first column labels each variable by number.
    3. Type the name of your variable (for example, x) in the Name column.
    4. Type the minimum value for the variable in the Min column.
    5. Type the maximum value for the variable in the Max column.
      Add variables
    6. Select the applicable number of decimal places for the variable in the Decimal Places drop-down list.
    7. In the Step field, type the increment that the system should use when choosing random numbers from the range you specified in the Min and Max fields.
      1. Example: If you create variable X with Min=100, Max=200, and Step=5, the system will only choose values for X that are increments of 5 above 100 (105, 110, 115, etc., up to 200) when generating questions.
    8. You can delete any option by clicking the trash can icon.
      Decimal Places options

Example: If 50% is chosen in the Worth drop-down list, the user would receive 50% of the points for the question for answering with the correct value, and would receive the other 50% if they answered using the correct unit. Note: that if you have selected the case sensitive option, users must type the unit in the proper letter case to have their answer considered correct.

Example:  If 50% is chosen in the Worth drop-down list, the user would receive 50% of the points for the question for answering with the correct value, and would receive the other 50% if they answered using the correct unit. Note: that if you have selected the case sensitive option, users must type the unit in the proper letter case to have their answer considered correct.

Significant Figures Question (x10)

The Significant Figures question type is most applicable to science and math related courses. This question type is similar to Arithmetic questions type but allows users to enter their answers in scientific notation format. The questions are then graded based on what users entered as their significant digits.

  1. Type the formula you use to calculate the correct answer in the Formula text field Refer to step 5 in the Arithmetic question instructions for a list of supported functions.
    1. Click Test to ensure that your formula has been entered properly. The system provides a test case of the equation in a new page.
      Formula Bar
  2. Choose the number of significant figures that the system should accept in answers from the Significant Figures drop-down list (this is the number of digits that are accepted in the non-exponent field). Choose a percentage value from the Deduct drop-down list if you want to assign only a certain portion of marks for this question for entering the correct significant digits.
    1. Example: You might choose to assign 70% of the points for this question for getting the significant figures correct, and 30% for getting the unit correct.
      Significant Figure options
  3. For Tolerance select either: 
    1. Plus or minus one half of the least significant figure.
    2. Units and type the applicable value in the corresponding text field.
    3. Percent and type the applicable value in the corresponding text field.
      1. For example, a tolerance of 3% would allow answers to be off by 3%, or a tolerance of 1.2 x 102 units would allow answers to be off by that much.
  4. If your question uses a certain kind of unit (for example, MPH, mm, etc.), type the unit in the Units text field
    1. Check Case Sensitive if the unit is case sensitive.
    2. If you want to assign points for using the correct unit in the answer, choose a percentage value from the Worth drop-down list.
      Units options
  5. In the Variables section, define all of the variables you used in the Question Text.
    1. To add more variables, enter a number in the field next to Add Variable and click +.
    2. The first column labels each variable by number
    3. Type the name of your variable (for example, x) in the Name column.
    4. Type the minimum coefficient for the variable in the field to the left of x10 in the Min column.
    5. Type the maximum coefficient for the variable in the field to the left of x10 in the Max column.
    6. In the Step field, type the increment that the system should use when choosing random numbers from the range you specified in the Min and Max fields.
      Example: If you create variable X with Min=100, Max=200, and Step=5, the system sets values for X that are increments of 5 over 100 (105, 110, 115, etc., up to 200)
      Note: The Min, Max, and Step values must all be entered in scientific notation. Enter the significant digits in the first text field, and the exponent in the second text field that is to the upper-right of “x10”.
    7. You can delete any option by clicking the trash can icon. 

Example: If 30% is chosen in the Worth drop-down list, a user would receive 30% of the points for the question for using the correct unit, and the remaining 70% would be earned by answering with the correct significant figures.

Likert Question (LIK)

Likert questions ask users to rank something on an ordinal scale. For example, you may ask someone to rank their satisfaction on a scale of 1 (Very Unhappy) to 5 (Very Happy). These questions are suited for surveys since the questions are opinion-based.

  1. Write your question and any instructions in the Introductory Text field.
    Likert introduction text field
  2. Choose which scale you would like to give users to rank items.
    Likert Scale options
  3. Write out the items in the fields under the Value column of the table.
  4. If you would like to add more options, enter a number in the field next to Add Option and click +.
  5. You can delete any option by clicking the trash can icon.
    Other Likert Options

Text Information (TXT) Item

Use this feature to create a question consisting of text only. You can use it to provide supplementary information on a quiz. For example, perhaps you have a case study you want to base several questions on. Instead of inserting the case study into each question, you can simply create a text information question and have your related questions appear directly underneath the text information question. Simply enter your information text in the text box and Save

Image Information (IMG) Item

Use this feature to create a question consisting of an image only. You can use it to provide supplementary information on a quiz. For example, perhaps you have a diagram you want to refer to in several quiz questions. Instead of inserting the diagram into each question, you can simply create an image information question and have your related questions appear directly underneath the image information item.

Understanding Regular Expressions

The Quizzes tool uses regular expressions to give users grading a quiz the ability to evaluate answers for short answer and fill-in-the-blank questions against a set of acceptable values.

A regular expression uses alpha-numeric and special characters, known as meta-characters to create a pattern that describes one or more strings to match when searching a body of text. The regular expression is a template for matching a character pattern in the text you are searching. This helps automate the grading process for course designers for short answer and fill-in-the-blank questions.

Note: Short answer and fill-in-the-blank questions are the only two question types for which you can use regular expressions.

Regular Expressions - Fill in the Blanks (FIB) Examples

Question: A _____ wags his tail. He eats dog _______ twice a day.

Answer: Blank 1 = [D|d]og. Blank 2 = [F|f]ood

Question: The classic movie “Close Encounters of the Third Kind” was directed by none other than Steven ________who also directed E.T and Indiana Jones series.

Answer: [S|s]pielberg

Regular Expressions - Short Answer (SA) Examples

Question: What word describes red, blue, green, yellow, pink, etc.?

Answer: color*

Question: What kind of animal meows?

Answer: The answer used in the sample question: [C|c]at. Size used in the sample question: row size = 2, column size = 20

To use regular expressions

  1. In a short answer (SA) or fill-in-the-blank (FIB) question, select the Regular Expression radio button under Evaluation.
  2. For short answer questions choose the size of the answer field using the Rows and Columns drop-down menus.
  3. Type the answer in the Answer field using meta-characters to set the allowable values. If you have multiple blanks in a FIB question type repeat this to fill all Answer fields.
  4. Click Save (or click Preview, to see the question before it is saved).

Meta-characters and their Behavior

Character Description Example

\

Marks the next character as a special character, a literal, a back reference, or an octal escape.

The sequence '\\' matches "\" and "\(" matches "(".

n matches the character n.

\n matches a new-line character.

^

Matches the position at the beginning of the input string. If the RegExp object’s Multi-line property is set, ^ also matches the position following '\n' or '\r'.

^cat matches strings that begin with cat

$

Matches the position at the end of the input string. If the RegExp object’s Multi-line property is set, $ also matches the position preceding '\n' or '\r'.

cat$ matches any string that ends with cat

*

Matches the preceding character or sub-expression zero or more times.

* equals {0,}

be* matches b or be or beeeeeeeeee

zo* matches z and zoo.

+

Matches the preceding character or sub-expression one or more times.

+ equals {1,}.

be+ matches be or bee but not b

?

Matches the preceding character or sub-expression zero or one time.

? equals {0,1}

abc? matches ab or abc

colou?r matches color or colour but not colouur

do(es)? matches the do in do or does.

?

When this character immediately follows any of the other quantifiers (*, +, ?, {n}, {n,}, {n,m}), the matching pattern is non-greedy. A non-greedy pattern matches as little of the searched string as possible, whereas the default greedy pattern matches as much of the searched string as possible.

In the string oooo, o+? matches a single o, while o+ matches all os.

0

Parentheses create a sub-string or item that you can apply meta-characters to.

a(bee)?t matches at or abeet but not abet

{n}

n is a non-negative integer. Matches exactly n times.

[0-9]{3} matches any three digits

o{2} does not match the o in Bob, but matches the two os in food.

b{4} matches bbbb
 

{n,}

n is a non-negative integer. Matches at least n times.

[0-9]{3,} matches any three or more digits

o{2,} does not match the "o" in "Bob" and matches all the o's in "foooood". 'o{1,}' is equivalent to 'o+'. 'o{0,}' is equivalent to 'o*'.

{n,m}

m and n are non-negative integers, where n <= m. Matches at least n and at most m times.

Note: You cannot put a space between the comma and the numbers.

[0-9]{3,5} matches any three, four, or five digits

"o{1,3}" matches the first three o's in "fooooood". 'o{0,1}' is equivalent to 'o?'.

c{2, 4} matches cc, ccc, cccc

.

Matches any single character except "\n".

To match any character including the '\n', use a pattern such as '[\s\S]'.

cat. matches catT and cat2 but not catty

(?!)

Makes the remainder of the regular expression case insensitive.

ca(?i)se matches caSE but not CASE

(pattern)

Matches pattern and captures the match. The captured match can be retrieved from the resulting Matches collection, using the SubMatches collection in VBScript or the $0$9 properties in JScript.

To match parentheses characters ( ), use '\(' or '\)'.

(jam){2} matches jamjam. First group matches jam.

(?:pattern)

Matches pattern but does not capture the match, that is, it is a non-capturing match that is not stored for possible later use.

This is useful for combining parts of a pattern with the "or" character (|).

'industr(?:y|ies) is a more economical expression than 'industry|industries'.

(?=pattern)

Positive lookahead matches the search string at any point where a string matching pattern begins. This is a non-capturing match, that is, the match is not captured for possible later use.

Lookaheads do not consume characters, that is, after a match occurs, the search for the next match begins immediately following the last match, not after the characters that comprised the lookahead.

'Windows (?=95|98|NT|2000)' matches "Windows" in "Windows 2000" but not "Windows" in "Windows 3.1".

(?!pattern)

Negative lookahead matches the search string at any point where a string not matching pattern begins. This is a non-capturing match, that is, the match is not captured for possible later use.

Lookaheads do not consume characters, that is, after a match occurs, the search for the next match begins immediately following the last match, not after the characters that comprised the lookahead.

'Windows (?!95|98|NT|2000)' matches "Windows" in "Windows 3.1" but does not match "Windows" in "Windows 2000".

x|y

Matches x or y.

July (first|1st|1) will match July 1st but not July 2

'z|food' matches "z" or "food". '(z|f)ood' matches "zood" or "food".

[xyz]

A character set. Matches any one of the enclosed characters.

gr[ae]y matches gray or grey

'[abc]' matches the 'a' in "plain".

[^xyz]

A negative character set. Matches any character not enclosed.

1[^02] matches 13 or 11 but not 10 or 12

[^abc]' matches the 'p' in "plain".

[a-z]

A range of characters. Matches any character in the specified range.

[1-9] matches any single digit EXCEPT 0

'[a-z]' matches any lowercase alphabetic character in the range 'a' through 'z'.

[^a-z]

A negative range characters.

Matches any character not in the specified range.

'[^a-z]' matches any character not in the range 'a through 'z'

\b

Matches a word boundary, that is, the position between a word and a space.

'er\b' matches the 'er' in "never" but not the 'er' in "verb".

\B

Matches a nonword boundary.

'er\B' matches the 'er' in "verb" but not the 'er' in "never".

\cx

Matches the control character indicated by x.

The value of x must be in the range of A-Z or a-z.

If not, c is assumed to be a literal 'c' character.

\cM matches a Control-M or carriage return character.

\d

Matches a digit character.

Equivalent to [0-9]

 

\D

Matches a non-digit character

Equivalent to [^0-9]

 

\f

Matches a form-feed character.

Equivalent to \x0c and \cL

 

\n

Matches a new-line character.

Equivalent to \x0a and \cJ

 

\r

Matches a carriage return character.

Equivalent to \x0d and \cM

 

\s

Matches any white space character including space, tab, form-feed, etc.

Equivalent to [ \f\n\r\t\v]

Can be combined in the same way as [\d\s], which matches a character that is a digit or whitespace.

\S

Matches any non-white space character.

Equivalent to [^ \f\n\r\t\v]

 

\t

Matches a tab character.

Equivalent to \x09 and \cI

 

\v

Matches a vertical tab character.

Equivalent to \x0b and \cK

 

\w

Matches any word character including underscore.

Equivalent to '[A-Za-z0-9_]'

 

\W

Matches any non-word character.

Equivalent to '[^A-Za-z0-9_]'

You should only use \D, \W and \S outside character classes.

 

\Z

Matches the end of the string the regular expression is applied to. Matches a position, but never matches before line breaks.

.\Z matches k in jol\hok

\xn

Matches n, where n is a hexadecimal escape value.

Hexadecimal escape values must be exactly two digits long.

Allows ASCII codes to be used in regular expressions.

'\x41' matches "A". '\x041' is equivalent to '\x04' & "1"

\num

Matches num, where num is a positive integer.

A reference back to captured matches.

'(.)\1' matches two consecutive identical characters

\n

Identifies either an octal escape value or a back-reference.

If \n is preceded by at least n captured sub-expressions, n is a back-reference.

Otherwise, n is an octal escape value if n is an octal digit (0-7).

“\11” and “\011” both match a tab character. “\0011” is the equivalent of “\001” & “1”.

\nm

Identifies either an octal escape value or a back-reference.

If \nm is preceded by at least nm captured sub-expressions, nm is a back-reference.

If \nm is preceded by at least n captures, n is a back-reference followed by literal m.

If neither of the preceding conditions exists, \nm matches octal escape value nm when n and m are octal digits (0-7).

 

\nml

Matches octal escape value nml when n is an octal digit (0-3) and m and l are octal digits (0-7).

 

\un

Matches n, where n is a Unicode character expressed as four hexadecimal digits.

For example, \u00A9 matches the copyright symbol (©).