Am I right in thinking that all procedures start with CREATE PROCEDURE and end with ; ? If you do an SQL dump, you get the SQL for the entire database in a plain text file. You can easily scan it for its text, and it shouldn't be hard to create a regular expression to find procedures. Finding the end of a procedure might be more awkward because you might have DELIMITER instructions so there are ; in the text. You might also have ; inside 'strings' with 'quote marks' like this: 'Campbell Ritchie should never be trusted; he makes mistakes all the time.' You can probably permit quotes and DELIMITER instructions in your regular expression. You never know, there might be one ready-made somewhere. If you are looking for one, try here.