Retrieve string given search criteria. Brackets, quotations and more
<p>I have the following string:</p>

<pre><code>NoticeText:
    NoticeType [str] = USER_TYPING_ON
    Text [str] = "user is typing"
    EventInfo:
        PartyId [int] = 2
        EventType [str] = MESSAGE
        UserNickname [str] = "Michael"
        EventId [int] = 4
        Text [str] = "Hey, how are you?"
        MsgCheck [str] = NONE
        TimeOffset [int] = 23
        UserType [str] = AGENT
NoticeText:
    NoticeType [str] = USER_TYPING_ON
    EventInfo:
    PartyId [int] = 1
        EventType [str] = MESSAGE
        UserNickname [str] = "Bob Smith"
        EventId [int] = 6
        Text [str] = "I'm good, how are you?"
        MsgCheck [str] = NONE
        TimeOffset [int] = 28
        UserType [str] = CLIENT
        MessageType [str] = "text"
</code></pre>

<p>I need to be able to retrieve the sentence "I'm good, how are you?". I am completely stumped. </p>

<p>I tried to retrieve phrases after "Text [str] =", that gives back what I need. But it also gives back all other sentences after "Text [str] =".</p>

<p>One tip that might help you guys is the PartyId [int], field. 1 corresponds to the client. Which is the person's message that I need.</p>

<p>I just don't know how to narrow it down by that.</p>

<p>Please help!</p>