fork download
  1. library(stringr)
  2. str_replace('filter [70.00-140.00]','(?<=\\[)\\d+', '80')
  3. sub('\\[\\d+', '[80', 'filter [70.00-140.00]')
  4. sub('(?<=\\[)\\d+', '80', 'filter [70.00-140.00]', perl=TRUE)
Success #stdin #stdout 0.25s 42748KB
stdin
Standard input is empty
stdout
[1] "filter [80.00-140.00]"
[1] "filter [80.00-140.00]"
[1] "filter [80.00-140.00]"