fork download
  1. x <- c("lkas32kj_123_3.21", "lkas32kj_123_3.21|l3kj_12_0.21|123e_4_32.1", "+++NO+++")
  2. rx <- "[[:alnum:]]+(?:_\\d+){2}(?:\\.\\d+)?"
  3. grepl(paste0("^", rx, "(?:\\|", rx ,")*$"), x)
  4.  
Success #stdin #stdout 0.23s 183680KB
stdin
Standard input is empty
stdout
[1]  TRUE  TRUE FALSE