fork download
  1. library(stringr)
  2. string = "248_HIGH_FAN_BLADE"
  3. pattern = "\\b[A-Z0-9]+([A-Z0-9]_[A-Z0-9])";
  4. str_match_all(string, pattern)[[1]][,2]
  5.  
  6.  
Success #stdin #stdout 0.24s 190528KB
stdin
Standard input is empty
stdout
[1] "8_H"