code / bp

Lines4.3K C3.3K Markdown541 YAML273 make110 Shell77 Lua54
(4 lines)
1 # Captures with @ can be referenced in a replacement by @1, @2, etc.
2 # Example: bp '{"=" _ @+`0-9 => "= -@1"}' replaces "x = 5" with "x = -5"
3 # Note: @0 refers to the entire match, e.g. bp '{"foo" => "xx@0xx"}' replaces "foo" with "xxfooxx"
4 bp '{@`a,e,i,o,u => "{@1}" / .}'