Implemented regex with labels