Remove unused variable, change regex

Add anchor to continue check regex