old_contents: # -*- coding: utf-8 -*-
  
  INDENT = r"(?P<indent>^ *)"
  VARIABLE = r"(?P<variable>.+):"
  VALUE = r"(?P<value>((?P<q2>['\"]).*?(?P=q2))|[^#]+?)"
  NEWLINE = r"$\n"
  BLANK = r" +"
  INLINE_COMMENT = r"( +#.*)?"
  
  COMMENT = r"^ *#.*" + NEWLINE
  BLANK_LINE = r"^[ \t]*" + NEWLINE
  DASHES = r"^---" + NEWLINE
  
  SECTION = INDENT + VARIABLE + INLINE_COMMENT + NEWLINE
  SIMPLE = INDENT + VARIABLE + BLANK + VALUE + INLINE_COMMENT + NEWLINE
  
  NULL = r"\b(null|Null|NULL|~)\b"
  TRUE = r"\b(true|True|TRUE)\b"
  FALSE = r"\b(false|False|FALSE)\b"
  INT = r"[-+]?[0-9]+"
  FLOAT = r"([-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?)"
  STR = r"(?P<quotes>['\"]?).*(?P=quotes)"
  
new_contents: # -*- coding: utf-8 -*-
  
  INDENT = r"(?P<indent>^ *)"
  VARIABLE = r"(?P<variable>.+):"
  VALUE = r"(?P<value>(?:(?P<q2>['\"]).*?(?P=q2))|[^#]+?)"
  NEWLINE = r"$\n"
  BLANK = r" +"
  INLINE_COMMENT = r"(?: +#.*)?"
  
  COMMENT = r"^ *#.*" + NEWLINE
  BLANK_LINE = r"^[ \t]*" + NEWLINE
  DASHES = r"^---" + NEWLINE
  
  SECTION = INDENT + VARIABLE + INLINE_COMMENT + NEWLINE
  SIMPLE = INDENT + VARIABLE + BLANK + VALUE + INLINE_COMMENT + NEWLINE
  
  NULL = r"\b(null|Null|NULL|~)\b"
  TRUE = r"\b(true|True|TRUE)\b"
  FALSE = r"\b(false|False|FALSE)\b"
  INT = r"[-+]?[0-9]+"
  FLOAT = r"([-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?)"
  STR = r"(?P<quotes>['\"]?).*(?P=quotes)"
  
subject: Update to non-capturing groups in VALUE and INLINE_COMMENT