abstract input regex