I parse an XML file with PHP. My problem is I have a dynamic string with multiple lines and each line has no space char on it, and I want to find a word on that string. String's length is dynamic so it changes every time. Since strings length is dynamic I can't use something like \[code\]$c = substr($string, 0, -1)\[/code\] or I can't use something like \[code\]$i=stripos($story," word");\[/code\] because there is no space in the string.example string is 4 lines and I want to detect the word ARC.docx on second line before \[code\]</a>\[/code\]:\[code\]<![CDATA[In <a href='http://stackoverflow.com/home/Apps/ARCMeeting'>ARCMeeting</a>, You edited the file <a href='https://dropbox.com/get/Apps/ARCMeeting/ARC.docx?w=d3' title='/Apps/ARCMeeting/ARC.docx'>ARC.docx</a>.<br/>]]>\[/code\]My goal is add that ARC.docx on second line before to a message body \[code\]$message='X File has been edited!';\[/code\]so I can print\[code\]$message='ARC.docx File has been edited!';\[/code\]How can I detect word that in between \[code\].......>exampleword</a>.\[/code\] in above string?Thanks in advance