in reply to Matching against a partially known string

If you have fixed text that you are matching on, you could use Text::Abbrev to test whether your  $buff equals one of the possible abbreviations.

If you know the fixed length of the buffer, simply either create a fixed length version of your regexp or work out manually, if you can, all the ways of expanding the regexp out to the length of the buffer. For fixed strings, use  substr. This will be much, much easier, that trying to interface to the perl regexp code.

-Mark