fork download
  1. x <- c("PIA+1+TC_5504_00_312010_0050+50103 AB346 type 5334",
  2. "PIA+1+TC_3444_00_312010_0133+0140",
  3. "PIA+1+DRW/50488665600/01/000:DW",
  4. "PIA+1+TC_5635_00_312019_2644+LoremIpsum",
  5. "PIA+1+TC_5635_00_312010_0040+63503 AB346 type 5334",
  6. "PIA+1+TC_5635_00_312018_0223+DolorSit",
  7. "PIA+1+TC_5635_00_312019_2644+DolorSit")
  8. grep("^PIA\\+\\d\\+(?!.*(?:LoremIpsum|DolorSit))", x, perl=TRUE, value=TRUE)
Success #stdin #stdout 0.22s 39396KB
stdin
Standard input is empty
stdout
[1] "PIA+1+TC_5504_00_312010_0050+50103 AB346 type 5334"
[2] "PIA+1+TC_3444_00_312010_0133+0140"                 
[3] "PIA+1+DRW/50488665600/01/000:DW"                   
[4] "PIA+1+TC_5635_00_312010_0040+63503 AB346 type 5334"