Returning filename and matching lines

What I'm trying to do is to search through a list of files, and output the filename, followed by the lines that matched the pattern.

I'm matching the string "letters.moreletters" in any one of searched files, and the output I'm trying to get is:

program_1.txt
10 dsdsd sdsd dsd dsdsd.dsdsd dsdsdsd sdsd
12 sasas sasas sasas sasas.sasas sasas sasas
program_2.txt
15 ewewe ewewe ewewe ewewe.ewew ewewe
25 fdfdf fdfdf fdfdf fdfdf.fdfdf fdfdf dfdfdf fdfdf

So far I've got
grep -n '[A-Za-z0-9_]\.[A-Za-z_]' *.txt | awk -F: '{print $1"\n";print $2"\t"$3}'
(apologies if thats not the exact syntax, I can't test at the moment) which outputs :
program_1.txt
10 dsdsd sdsd dsd dsdsd.dsdsd dsdsdsd sdsd
program_1.txt
12 sasas sasas sasas sasas.sasas sasas sasas
program_2.txt
15 ewewe ewewe ewewe ewewe.ewew ewewe
program_2.txt
25 fdfdf fdfdf fdfdf fdfdf.fdfdf fdfdf dfdfdf fdfdf

...which is nearly there, but I don't know UNIX well enough to know if I'm going in the wrong direction. The other problem with the above command is it assumes the : will be used for the grep delimiter, and that no more will appear.
I basically want awk to take the first, second and the rest of the string, and dedupe every third line.

Any help is much appreciated, as there appears to be so many ways to accomplish these things, but putting them to practise is another story.

Here is one quick and simple way:

for file in `grep -l aabbcc *`
        do
        echo $file
        grep -n aabbcc $file | sed 's/:/ /'
        done

Replace aabbcc in the code above with the pattern you are looking for in the file.
Replace the first * in the code with your file name pattern.
sed will only look for the first instance of : on the output from grep.

That's great, although I'm hoping to find a way that works without a shell, so for instance, I could have it working in Windows with the UnxUtils.