Really simple, but I can get the 'greediness' of regex to work like I want. Say you have:
unlist(stringr::str_extract_all("XXXXSXTXXX","([A-Z]{2}[T|S][A-Z]{2})"))
This gives only the first match:
[1] "XXSXT"
How can I change the regex behaviour to give me both matches with S and T (without use two separate patterns), like:
[1] "SXTXX" "XXSXT"