Forum Moderators: phranque
.* "Match any number of any characters -- including zero"
[^.]+ "Match one or more characters except a literal period" -- or equivalently, "Match one or more characters until you find a period."
In the first pattern, everything in the string is initially matched into the pattern, leaving nothing for the rest of the pattern (in your example, "\.html") to match. Therefore, the matching engine will have to make multiple passes to make a match, backing off one character at a time through l, m, t, h, and the period.
Therefore, the second pattern is more efficient, because it is much less ambiguous.
Take a look in our forum charter (link at top left) for some useful links.
Jim