fork download
  1. string <- 'sp|Q2UVX4|CO3_BOVIN Complement C3 OS=Bos taurus OX=9913 GN=C3 PE=1 SV=2'
  2. library(stringr)
  3. str_match(string, '[a-z]{2}\\|[|\\w]*[A-Z]\\s+(.*?)\\s+OS=')[,2]
  4. #[1] "Complement C3"
  5.  
Success #stdin #stdout 0.28s 42440KB
stdin
Standard input is empty
stdout
[1] "Complement C3"