I have this string:
private | public-read | public-read-write | authenticated-read | aws-exec-read | bucket-owner-read | bucket-owner-full-control
I would like to find a mnemonic or easy pattern that could allow me to achieve this:
"private" , "public-read", "public-read-write", "authenticated-read", "aws-exec-read", "bucket-owner-read","bucket-owner-full-control"
If am trying first with \w
:
s/\(\w\+\)/"\1"/g
But problem is that ignore the colon and returns:
"public"-"read"-"write"
instead of:
"public-read-write"
Any ideas, tips?
[^ |]
(anything not a bar or space);\k
if-
is in iskeyword;\f
might work if space isn’t in isfname, though both this and the former may or may not grab the bars (I’m mot sure);