In a couple recent questions here on Stack Overflow, I've seen the regex sequence .{1}
. In the regex engines with which I'm familiar, a repeat count of 1 is strictly redundant.
Is there a regex engine that I am unaware of for which this is not true?
Could this explicit count of 1 be an attempt to comment/highlight that the preceding .
is a metacharacter?
I'm just trying to understand the motivations for this practice.
Links: Regex with $ anchor and look ahead is the most recent... looking for the other...