0

I'd appreciate some help with regex cause I suck at it! I'm looking for a good solution for scanning a string, say an email paragraph, and identifying anywhere two braces face eachother with text between them. For example:

text:

Hello {name}, This is {company} here to tell you about our recent development of our new product {product}

findAttributes(text) -> ["{name}", "{company}", "{product}"]

How does the regex work for this type of dynamic string? Thanks so much for any help!

Sean J
  • 31
  • 3
  • 1
    Plenty of questions like https://stackoverflow.com/questions/413071/regex-to-get-string-between-curly-braces – epascarello Sep 01 '21 at 18:03
  • Have you taken a look at [this question](https://stackoverflow.com/questions/11907275/regular-expression-to-match-brackets/11907598)? Or [this one](https://stackoverflow.com/questions/2403122/regular-expression-to-extract-text-between-square-brackets)? If yes, where exactly are you stuck? – A_A Sep 01 '21 at 18:03
  • Please provide enough code so others can better understand or reproduce the problem. – Community Sep 05 '21 at 00:10

0 Answers0