note: regular expression syntax may vary among different programs...
in grep the .
means "any character". *
means; the previous character repeated 0, 1 or more times. So your expression
7.*
means: a 7
followed by "any character", repeated any number of times (0, 1 or more), ie: a 7
followed by any succession of characters. The other expression
7*
means: the character 7
, repeated 0, 1 or more times; thus matching any document; only the rest of your regular expression is still working...