I have a text like following pattern
And also two pattens like [color=Red]xx[/color] and [color=Red]zz[/color]
I need to find longest possible string which include above two patterns.
So any one can post a algorithm for this it is very help full for me.
please help me .......