I have two articles ( plain text ), i am looking to match the first article with the second article and highlight the matched data.
SCENARIO:
ARTICLE(A)
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passahttp://stackoverflow.com/posts/16365110/editges, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
ARTICLE(B)
dummy text ever since the 1500s. It has survived not only five centuries. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages
OUTPUT SHOULD BE LIKE THIS
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard <span class="highlight">
dummy text ever since the 1500s</span>
, when an unknown printer took a galley of type and scrambled it to make a type specimen book. <span class="highlight">
It has survived not only five centuries</span>
, but also the leap into electronic typesetting, remaining essentially unchanged. <span class="highlight">
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages</span>
, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Note:
Aricle B can be treated as an array like this
[0]=dummy text ever since the 1500s
[1]=It has survived not only five centuries
[2]=It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages
How can I achieve above output?
I hope this is clear enough. Thanks in advance.
dummy text ever since the 1500s
. Should it match the worddummy text
alone indummy text rest is useless
if that sentence appears in Article A? – raidenace