Build, test, and debug regular expressions
The dot operator (.) matches any single character except a newline, so this pattern matches any three-character sequence ending in the literal 'ar' — e.g. 'car', 'bar', 'far', '1ar', or '#ar'. With the global flag, every occurrence in the string is matched, while the multiline flag has no effect since no ^ or $ anchors are present. Commonly used to find short words ending in 'ar' or to match any character preceding the substring 'ar'.