Results 1 to 2 of 2

Thread: Comparing paragraphs of text

  1. #1
    Join Date
    Jul 2012

    Comparing paragraphs of text

    I'm looking to compare one paragraph of text to another and output any words that don't appear in the original paragraph. Both are similar but one has additional words written into it and I just need to output these extra words if that makes sense.

    I know some javascript but I'm pretty unsure how to go about this. Guessing it would be along the lines of breaking the words down into strings and progressing from there... Or this may be much harder than I originally thought it might be.

    Any help with the general code or pointers would be much appreciated!!

    All the best,

  2. #2
    Join Date
    Dec 2005
    1. Collect the text information as 2 separate arrays.
    2. Sort the arrays.
    3. Loop through one array while comparing contents of the other.
    4. Save any non-duplicates found between the 2 arrays.

    Provide the paragraph information in some HTML code example.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center