regex haddock fix