getParam regex functionality