Construct a regular expression that checks if a token both begins and ends with the same symbol. A token is considered valid when its first and last character are identical.
From a collection of inputs comprised solely of the characters 'c' and 'd', design a regular expression to match only those inputs that share their first and last character.
Fill in the blank ("______") with a regular expression that meets these criteria. The locked code in the editor outputs True for matching inputs and False otherwise.

The regular expression to validate strings.
Expert in Data Structures & Algorithms. Building tools to help developers crack FAANG interviews.