This playground implements a faithful subset of GNU sed in pure JavaScript — no server, no WASM — verified against real gsed. BRE/ERE are translated to JavaScript regex, so most patterns behave like GNU sed. File/shell commands (r R w W e) are inert here since there is no filesystem.
| s/re/repl/flags | substitute — flags g p i I m M, a number N (Nth match), Ng. Replacement supports &, \1–\9, \n \t, and case ops \U \L \u \l \E. |
| y/abc/xyz/ | transliterate characters one-for-one. |
| p P d D n N | print / print-first-line / delete / delete-first-line / next / append-next. |
| h H g G x | hold-space: copy/append to hold, copy/append back, exchange. |
| b t T :label | branch, branch-if-substituted, branch-if-not, define label. |
| a i c | append / insert / change text (use a\text or a text). |
| q Q = l z F { } | quit / silent-quit / line number / unambiguous list / zap / filename / grouping. |
| addresses | N, $, /re/, \cREc, first~step, ranges a1,a2, a1,+N, a1,~N, 0,/re/, and ! negation. |