我正在尝试编写一个正则表达式,它将捕获两个或多个空白空间,不包括领先的空白空间。以下面这个例子为例 One OS to find them.In the bright land of Linux, Where the hackers play.
通过使用这个regex ([ ]* ){2,},我可以捕获两个或多
我想为rm *编写一个posix正则表达式,其中rm和*之间可以有1到多个空格。下面是我提出的正则表达式。我已经在一些在线posix正则表达式测试员上测试过它,但是它在我的程序中不起作用。正则表达式:^rm[[:space:]]+[*]$int reti;
reti = regcomp(®ex, "^rm[[:space:]]+[*]$", 0);if( reti ){ fprintf(stderr, "Could not compile reg