It all depends, but Perl would be a suitable programming language to knock up a quick and dirty script that will pattern match and insert into your database.
See here for opening file handles:
See here for regular expressions - (Formulate these in order to match the strings you are interested in).
See here for a MySQL database interface in Perl:
There is plenty of information out there. Let me know if you need any help.
Cheers,
ns