Merge pull request #59 from da2x/patch-1

Print usage() when pattern is invalid
This commit is contained in:
orignal 2019-02-04 08:55:28 -05:00 committed by GitHub
commit a6663fb8b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -287,7 +287,8 @@ int main (int argc, char * argv[])
//
if(!options.reg && !check_prefix( argv[1] ))
{
std::cout << "Not correct prefix(just string)" << std::endl;
std::cout << "Invalid pattern." << std::endl;
usage();
return 1;
}else{
options.regex=std::regex(argv[1]);