I need a demorgan function

I need a function which can convert this expression

F1 and (F2 or F3)
to
(F1 and F2) or (F1 and F3)

private function Demorgan (Expr as string) as string
...
end function

plz help