0

I have character strings like

str1 <- "Hello {can you please} {extract this}"

I need to extract "can you please" and "extract" this as a list with regex.

How can I do it?

user20650
  • 24,654
  • 5
  • 56
  • 91
  • 1
    Try `str_extract_all(str1, "(?<=[{])[^}]+")` – akrun May 26 '18 at 05:10
  • Hi. Yes, you can. However, you are expected to try to write the code yourself. Then give a clear explanation of what isn't working and provide a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve). Read [How to Ask](http://stackoverflow.com/help/how-to-ask) a good question. Be sure to [take the tour](http://stackoverflow.com/tour) and read [this](https://meta.stackoverflow.com/questions/347937/im-new-to-stack-overflow-what-are-some-things-i-should-do-and-what-things-wil). – wp78de May 26 '18 at 05:40

0 Answers0