Various regexp fixes