[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: finding and removing duplicate string
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Fri, 2 Dec 2011 15:52:51 +0000
On 2 December 2011 15:51, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
>> <p>Bradley Cooper named Peoples Sexiest man alive 2011  Bradley
>> Cooper named Peoples Sexiest man alive 2011</p>
>>>
>> After putting check in the xsl and deleting the duplicate string. The
>> output should be:-
>>
>>  <text>
>>        <p>Bradley Cooper named Peoples Sexiest man alive 2011 </p>
>>   </text>
>
>
> I guess you could normalize, then tokenize on spaces, find the middle,
> then compare sides... if they are equal pick the first.

Or more simply substring based on the string length.


--
Andrew Welch
http://andrewjwelch.com

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member