Test, validate and match regular expressions
Matches lines that begin and end with the same letter (case-sensitive). The first character is captured from either lowercase a-z or uppercase A-Z, then .* allows any content in between, and \1 backreferences the exact same character at the line's end. With global and multiline flags, it finds all such lines in multiline text. Useful for coding challenges, word games, and text validation tasks.