If the syntax of the config file is fully represented in the example, a single regex substitution on each line could be enough. Something like:
s/^\s*([\w-])\s*/"$1" => /Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
In reply to Re^2: Approach to remove brackets from config
by psini
in thread Approach to remove brackets from config
by ewhitt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |