use regex in R to parse a string -
i have string this:
vmstat_webserver01.20130102 i need use regex pick value between "_" , "."
i tried this:
grep("(_.*)+.", name, value=true) did not work pointers?
you can gsub():
name <- 'vmstat_webserver01.20130102' gsub('.*_(.*)\\..*', '\\1', name)
Comments
Post a Comment