diff options
author | sandman <sandman@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-08-06 21:07:17 +0000 |
---|---|---|
committer | sandman <sandman@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-08-06 21:07:17 +0000 |
commit | 711367ec2e29a06ccc45d166ff6688f09f439dc8 (patch) | |
tree | fed33e2a4a2606419078e1df49fddbe294fbf6a7 /editors/sed.c | |
parent | 68268a3dd8d020b7181896c56f24837899dcf8be (diff) | |
download | busybox-w32-711367ec2e29a06ccc45d166ff6688f09f439dc8.tar.gz busybox-w32-711367ec2e29a06ccc45d166ff6688f09f439dc8.tar.bz2 busybox-w32-711367ec2e29a06ccc45d166ff6688f09f439dc8.zip |
Added the \CregexpC syntax as an alternative for /regexp/ (like GNU sed)
git-svn-id: svn://busybox.net/trunk/busybox@5164 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'editors/sed.c')
-rw-r--r-- | editors/sed.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c index 84aea9b0a..5fc3a14a5 100644 --- 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 | |||
194 | *linenum = -1; | 194 | *linenum = -1; |
195 | idx++; | 195 | idx++; |
196 | } | 196 | } |
197 | else if (my_str[idx] == '/') { | 197 | else if (my_str[idx] == '/' || my_str[idx] == '\\') { |
198 | if (my_str[idx] == '\\') { | ||
199 | my_str[idx] = 0; | ||
200 | sed_cmd-> delimiter = my_str[++idx]; | ||
201 | } | ||
198 | idx = index_of_next_unescaped_regexp_delim(sed_cmd, my_str, ++idx); | 202 | idx = index_of_next_unescaped_regexp_delim(sed_cmd, my_str, ++idx); |
199 | if (idx == -1) | 203 | if (idx == -1) |
200 | error_msg_and_die("unterminated match expression"); | 204 | error_msg_and_die("unterminated match expression"); |