Complete the code to match an identifier starting with a letter followed by letters or digits.
pattern = r"[1]"
The pattern [a-zA-Z][a-zA-Z0-9]* matches an identifier that starts with a letter and is followed by zero or more letters or digits.
Complete the regular expression to match an integer literal consisting of one or more digits.
pattern = r"[1]"
The pattern [0-9]+ matches one or more digits, which is suitable for integer literals.
Fix the error in the regular expression to correctly match a floating-point number with optional decimal part.
pattern = r"\d+[1]\d*"
The dot . is a special character in regex that matches any character. To match a literal dot, it must be escaped as \..
Fill both blanks to create a regex that matches an identifier starting with a letter and containing letters, digits, or underscores.
pattern = r"[1][2]*"
The first blank matches the first letter [a-zA-Z]. The second blank matches zero or more letters, digits, or underscores [a-zA-Z0-9_]*.
Fill all three blanks to create a regex that matches a string literal enclosed in double quotes, allowing escaped quotes inside.
pattern = r"\"[1][2]*[3]\""
The pattern matches a double quote, then zero or more occurrences of either an escaped character (like \"), or any character except a double quote, and finally a closing double quote.