From a 3rd party tool we got some text. I have to create an application which read the text and extract the text from a attribute.
BodyItems=[[Length=45, Text="Emphasis on subjective\, conscious experience "], [Length=47, StartIndex=45, Text="How you think\, feel\, perceive your social world"], [IndentationLevel=1, Length=38, StartIndex=92, Text="Chapter 12: Personality and Cognition"], [IndentationLevel=1, Length=37, StartIndex=130, Text="Chapter 14: Personality and the Self"], [IndentationLevel=1, Length=36, StartIndex=167, Text="Chapter 17: Personality and Culture"]]
I need to create a regex which process the above line of text and list the text which are wrapped inside Text="........"]
. I tried to create a regex but it has only one match .
Here is my regex
string strRegex = @"Text=\""[\w\W]*\""\]";
I want to create a regex which give the below output
- Text="Emphasis on subjective\, conscious experience "]
- Text="How you think\, feel\, perceive your social world"]
- Text="Chapter 12: Personality and Cognition"]
- Text="Chapter 14: Personality and the Self"]
- Text="Chapter 17: Personality and Culture"]