txt <- c("G1:E001", "No points here", "G2:E002", "G3:E003", NA)
# extract everything after the :
StrExtract(x=txt, pattern=":.*")
# extract everything between "left" and "right"
z <- c("yBS (23A) 890", "l 89Z) 890.?/", "WS (55X) 8(90)", "123 abc", "none", NA)
# everything enclosed by spaces
StrExtractBetween(z, " ", " ")
# note to escape special characters
StrExtractBetween(z, "\\(", "\\)")
Run the code above in your browser using DataLab