in reply to Matching a question in text

You could try reusing some functionality of Infobot by Kevin Lenzo.

Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com