SED - The Stream EDitor - WishList

Some wishes for upcoming versions of SED:


Replacement Pattern Magics
Add magics to "lowercase" and "uppercase" text.
Eric Pement" pemente@northpark.edu [001230]
   \l, \L      Lower-case next char, lower-case rest of pattern
   \u, \U      Upper-case next char, upper-case rest of pattern
       \E      End case conversion invoked by previous "\[lLuU]"

Startup Options
Add switch for "extended regular expressions".
Eric Pement" pemente@northpark.edu [001230]
   -E, --extended-regex
    No more need to backquote (...groups...) or x{interval,expressions}.
    Also: +, ?, and | work without backslashes, just like Perl.

Minimal Matching
Allow minimal matching, ie use the shortest match. (this requires the -E switch above).
Eric Pement" pemente@northpark.edu [001230]
    *?       0 or more, but as few as possible
    +?       1 or more, but as few as possible
    ??       0 or 1, but 0 if possible
    {m,n}?   between m and n, but as few as possible

Example:
   $ echo banana | sed "s/b.*an/TOAST/"
   TOASTa

   $ echo banana | perl -pe "s/b.*?an/TOAST/"
   TOASTana