Hi all

I'm trying to find a working regular expression for make this operation:

I have a text formatted as below:

{text1}{text2}{text3}{text4}.....{textN}

I need a regular expression for parse this text and "extract" a list of strings inside the {}. So the result should be a list like:

text1
text2
text3
text4
...
textN

I tried using the following code:

Qt Code:
  1. QRegExp RegExp("\\{(.*?)\\}");
  2. int Pos;
  3.  
  4. Pos = RegExp.indexIn(MyText);
  5. List = RegExp.capturedTexts();
To copy to clipboard, switch view to plain text mode 

but doesn't work, capturedTexts() return me a list with only two empty lines. I tested the regular expression \\{(.*?)\\} in a simulator and it work as expected but it seem QT doesn't accept it.

Someone can suggest me the right regular expression?

Thank you