projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
edcac55
)
Added the \CregexpC syntax as an alternative for /regexp/ (like GNU sed)
author
Robert Griebl
<griebl@gmx.de>
Tue, 6 Aug 2002 21:07:17 +0000
(21:07 -0000)
committer
Robert Griebl
<griebl@gmx.de>
Tue, 6 Aug 2002 21:07:17 +0000
(21:07 -0000)
editors/sed.c
patch
|
blob
|
history
diff --git
a/editors/sed.c
b/editors/sed.c
index 84aea9b0aaacf636d78ffb77b0e86b3b89b8ec57..5fc3a14a5f9ae6bd35756fcdf102692b17ebf571 100644
(file)
--- a/
editors/sed.c
+++ b/
editors/sed.c
@@
-194,7
+194,11
@@
static int get_address(struct sed_cmd *sed_cmd, const char *str, int *linenum, r
*linenum = -1;
idx++;
}
- else if (my_str[idx] == '/') {
+ else if (my_str[idx] == '/' || my_str[idx] == '\\') {
+ if (my_str[idx] == '\\') {
+ my_str[idx] = 0;
+ sed_cmd-> delimiter = my_str[++idx];
+ }
idx = index_of_next_unescaped_regexp_delim(sed_cmd, my_str, ++idx);
if (idx == -1)
error_msg_and_die("unterminated match expression");