1 | -- input 1: replacement (content of "replacement" snippet) |
2 | -- input 2: content (content of other snippet) |
3 | -- |
4 | -- probably does not handle special characters well... but should work for a first test |
5 | |
6 | _, _, from, to = replacement:find("s/(.*)/(.*)/") |
7 | return content:gsub(from, to) |
e.g. for #2000029
Snippet is not live.
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #2000031 |
Snippet name: | A replacement executor (draft) |
Eternal ID of this version: | #2000031/1 |
Text MD5: | fb9cec335e135700beb71e61d3b49d92 |
Author: | stefan |
Category: | |
Type: | New Tinybrain snippet |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-03-12 21:11:03 |
Source code size: | 283 bytes / 7 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 556 / 139 |
Referenced in: | [show references] |