Index: src/library/base/man/grep.Rd =================================================================== --- src/library/base/man/grep.Rd (revision 48319) +++ src/library/base/man/grep.Rd (working copy) @@ -73,7 +73,7 @@ \code{"\\9"} to parenthesized subexpressions of \code{pattern}. For \code{perl = TRUE} only, it can also contain \code{"\\U"} or \code{"\\L"} to convert the rest of the replacement to upper or - lower case. + lower case, or \code{"\\E"} to end such case conversion. } } \details{ Index: src/main/pcre.c =================================================================== --- src/main/pcre.c (revision 48319) +++ src/main/pcre.c (working copy) @@ -90,6 +90,9 @@ } else if (p[1] == 'L') { p++; n -= 2; upper = FALSE; lower = TRUE; + } else if (p[1] == 'E') { /* end case modification */ + p++; n -= 2; + upper = FALSE; lower = FALSE; } else if (p[1] == 0) { /* can't escape the final '\0' */ n--; @@ -168,6 +171,9 @@ } else if (p[1] == 'L') { p += 2; upper = FALSE; lower = TRUE; + } else if (p[1] == 'E') { /* end case modification */ + p += 2; + upper = FALSE; lower = FALSE; } else if (p[1] == 0) { p += 1; } else {