Skip to content

Commit

Permalink
regex: Support \S (#3817)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazarmy authored Sep 1, 2023
1 parent 681a6b0 commit c21764d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions librz/util/regex/regcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1116,8 +1116,14 @@ special(struct parse *p, int ch) {
ordinary(p, '\r');
return;
case 's':
num = 5;
memcpy(bracket, "\t\r\n ]", num);
case 'S':
num = 6;
const char *chars = "^\t\r\n ]";
if (ch == 's') {
num--;
chars++;
}
memcpy(bracket, chars, num);
break;
case 'd':
num = 4;
Expand Down
2 changes: 1 addition & 1 deletion test/db/archos/linux-x64/dbg_trace1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dcu main
ds 2 # Should be dsui call; ds
dbt~[6-] # dbtt here would be nice
EOF
REGEXP_FILTER_OUT=(loc\.[a-zA-Z0-9_]+.|main\+\d+.|entry0\+\d+.)
REGEXP_FILTER_OUT=(loc\.\S+.|main\+\d+.|entry0\+\d+.)
EXPECT=<<EOF
loc.func_0 loc.func_00
main+8
Expand Down

0 comments on commit c21764d

Please sign in to comment.