Reg Expressions Tutorial Game Notes - savannahc502/SavC-TechJournal-SEC260 GitHub Wiki

Website: https://regexcrossword.com/

  • Attempting Tutorial

Tutorial Rules:

  • Regex Clues = Clues that the solution must satisfy

Tutorial 1 Rules:

  • A+ = One or More A
    • + --> one or more
  • A|B = A or B
    • | --> or

Tutorial 2 Rules:

  • A+B? = A is One or More, B is one or zero
    • ? --> one or zero
  • A?B* = A is one or zero, B is zero or infinite
    • * --> zero or infinite

Tutorial 3 Rules:

  • [AB]+ = Either A or B is One or More
    • [] --> range, one of the given letters
  • [^A] --> Not the letter A
    • ^ --> not this letter, or not these letters when used in a range

Tutorial 4 Rules:

  • \ --> A backreference is repeating the content of a group (anything in parenthesis). Groups are number 1 to x
    • (A)\1 = This is saying the group, which is just A, will be 1 or more times
    • (B)?(A)\2 = This is saying B is one or zero, and A will occur two or more times
  • {} --> provides a range of minimum and maximum occurrences of the letter specified beforehand
    • A{2,} = A will occur a minimum of 2 times, no maximum specified
    • AAB{0} = A will occur, A will occur, B will occur minimum of zero times with no maximum specified

Tutorial 5 Rules:

  • Special characters:
    • \w --> word(letter)
    • \d --> digit
    • \s --> whitespace
      • Black = whitespace