Skip to content

s/// replacement: implement the \U \L \u \l \E case-conversion escapes #540

Open

Description

@sylvestre

GNU sed supports case-conversion escapes in the replacement text of s///. None of them work in uutils sed today.

$ echo "abc def" | sed 's/b\(.*\)/\U&/'
script uutils sed GNU sed 4.9
s/b\(.*\)/\U&/ aUbc def aBC DEF
s/b\(.*\)/\u&/ aubc def aBc def
s/b\(.*\)/\L&/ a\Lbc def abc def
s/b\(.*\)/\l&/ a\lbc def abc def
s/b\(.*\)/\E&/ a\Ebc def abc def

Activity

  1. transferred this issue fromuutils/findutilson Aug 26, 2026
  2. dedsec-terminal commented on Sep 15, 2026

    @dedsec-terminal

    Opened #557 for this — implements GNU \\U \L \u \l \E\ in \s///\ replacement (literals, &, \\1..9, with \g-per-occurrence reset and empty-match carry). Verified against GNU sed 4.9 on the issue table plus edge cases; \cargo test --lib\ 368 passed, integration 265 passed, clippy clean. PTAL.

  3. added 2 commits that reference this issue on Sep 30, 2026
    f4d2ff9
    5aeccfc
  4. added a commit that references this issue on Oct 14, 2026
    fdcc6fb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions