If you don't have a PCRE enabled Pike, then there should be a solution with Regexp(). But it seems like there's a little bug with $ on Regexp(), but one bug at a time :)
Not if it is the stone age Regexp(), as that one did/does not handle strings with null characters in it (except in cases where you really *want* it to treat \0 as end-of-string).