gym regex checking