fork download
  1. library(stringr)
  2. txt <- "bvwbjplbgvbhsrlpgdmjqwftvncz"
  3. str_extract(txt, "(.)(?!\\1)(.)(?!\\1|\\2)(.)(?!\\1|\\2|\\3)(.)")
Success #stdin #stdout 0.31s 42092KB
stdin
Standard input is empty
stdout
[1] "vwbj"