made regex utility use sessions