使用 jQuery 或 PHP 进行文本比较

use*_*950 1 php jquery

我有 2 个字符串作为示例,想查看两个字符串的 TEXT 是否完全正确。如果 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.
Run Code Online (Sandbox Code Playgroud)

正文 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.** 
Run Code Online (Sandbox Code Playgroud)

Pek*_*ica 5

您正在寻找一个“差异”实现,这不是完全微不足道的。这在 PHP 和 JavaScript 中都是可能的。

请参阅这些 SO 问题:

查找更多信息: