fork download
  1. x <- "4,05g"
  2. gsub("(\\d+(?:,\\d+)?[[:alpha:]]*)", "{\\1}", x)
Success #stdin #stdout 0.25s 39120KB
stdin
Standard input is empty
stdout
[1] "{4,05g}"