Thread:Project:Support desk/Scrape source code

How can you retrieve the raw source code for regex (in an extension, without API)? There must be some point in SkinTemplate.php where it grabs the source code before it's send to the parser, but how can i use it in an extension?