In Javascript, how can I use a regular expression to iterate through a string to isolate all occurances of strings starting with a '{' and ending with a '}' character?
So, for example the haystack string may be:
Lorem ipsum dolor {sit} amet, consectetur adipiscing elit. {Praesent} tincidunt, sapien non ultricies posuere, justo felis {placerat erat}, a laoreet felis justo in nisl. Donec.
The function would therefore need to return the following values:
- sit
- Praesent
- placerat erat
All help appreciated!