Click here to Skip to main content
15,885,435 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
Hi,

i have a text in my textarea as below.


I am the very model of a modern Major-General.

then i changed the sentence as below.

I am the model of a modern Major-General test.

that is i deleted the 'very' from sentence. now the textarea content is 'I am the model of a modern Major-General.'

i apply the diff-match and patch algorithm and get the sentence as below

I am the very model of a modern Major-General test.

now the textarea content 'I am the model of a modern Major-General.' and the algorithm output

'
XML
I am the <DEL style="COLOR: red; FONT-WEIGHT: bold">very</DEL> model of a modern Major-General <INS style="COLOR: green; FONT-WEIGHT: bold">test</INS>.

'

are equal.

My doubt is how to check textarea content and the algorithm output are equal after apply the del and ins tag?

Thanks
Posted
Updated 27-Nov-13 20:33pm
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900