TSCAmerica.com
TSCAmerica.com

Reputation: 5377

Text Comparison using jQuery or PHP

I have 2 strings as an example and want to see if the TEXT of both the strings are EXACT.If the STRING doesnt matches it should show which is the STRING or a sentence that is missing from the original string.

Is it possible in jQuery ? Any code ?

I tried to use lot of Online Text comparison Tools but none of them says that the following strings are exact and there is no difference, need to ignore Paragraph

Text 1

In this chapter, you learn some real time-savers. If you are tired of defining
the same layers, along with units, grid, snap, and ltscale, for each new
drawing, read on. You are about to learn how to create your own template
drawings. With templates, you can begin each new drawing with setups
you have defined and saved in previous MEMA sessions, or with a
variety of predefined setups included in the software.
In addition, you learn to reshape the grid using the LIMITS command
and to copy, move, and array objects on the screen so that you
do not have to draw the same thing twice. We begin with the LIMITS
command, because we want to change the limits as part of defining
your first template.

Text 2

In this chapter, you learn some real time-savers. If you are tired of defining the same layers, along with units, grid, snap, and ltscale, for each new drawing, read on. You are about to learn how to create your own template drawings. With templates, you can begin each new drawing with setups you have defined and saved in previous MEMA sessions, or with a variety of predefined setups included in the software.
In addition, you learn to reshape the grid using the LIMITS command and to copy, move, and array objects on the screen so that you do not have to draw the same thing twice. We begin with the LIMITS command, because we want to change the limits as part of defining your first template.** 

Upvotes: 1

Views: 673

Answers (1)

Pekka
Pekka

Reputation: 449515

You are looking for a "Diff" implementation, which isn't completely trivial. It's possible in both PHP and JavaScript.

See these SO questions:

To find more:

Upvotes: 5

Related Questions