You could maybe use the hook 'bbcode_parse_start', and then the text would be in the variable $parsedtext (see includes/class_bbcode.php around line 360). There's also a variable $dohtml that says whether or not html is enabled in a specific area, so you could do this:
Code:
if (!$dohtml) {
$parsedtext = // do your replacement
}
so that if you ever *did* have html enabled, you wouldn't perform your replacement.
(BTW, I haven't tried this)