使用jQuery或PHP进行文本比较

时间:2011-12-14 11:13:24

标签: php jquery

我有两个字符串作为示例,想要查看两个字符串的TEXT是否都是EXACT。如果STRING不匹配,则应显示哪个是STRING或原始字符串中缺少的句子。

在jQuery中可以吗?任何代码?

我尝试使用大量的在线文本比较工具,但没有一个人说下面的字符串是准确的并且没有区别,需要忽略段落

文字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.

文字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.** 

1 个答案:

答案 0 :(得分:4)

您正在寻找“差异”实施,这并非完全无足轻重。它可以在PHP和JavaScript中使用。

请参阅以下SO问题:

要了解更多信息: