I'm trying to extract substrings when it matches certain pattern. For example:
str <- "For each of the following statements, please indicate how true it is for\r\nyou with respect to your interaction with the puzzles in the game. - This is the part of string I want to extract."
str_extract(str, pattern = "(?<=-)\\w+") #Output = This
How do I get the whole string?