changing regex to pagetypes