Specific for beta-D-anomer-linked galactoside substrates. Hydrolyzes o-nitrophenyl-beta-D-galactopyranoside (ONPG), chromogen 5-bromo-4-chloro-3-indolyl-beta-D-galactopyranoside (X-gal) and to a lesser extent lactose. Hydrolyzes p-nitrophenyl-beta-D-galacturonide very slightly. Does not hydrolyze maltose, sucrose, raffinose or melibiose. Has some transgalactosylation activity yielding galacto-oligosaccharides (GaOS), including O-beta-D-galactopyranosyl-(1,3)-O-beta-D-galactopyranosyl-(1-4)-D-glucopyranose. Hydrolysis of terminal non-reducing beta-D-galactose residues in beta-D-galactosides. Belongs to the glycosyl hydrolase 42 family.