3 of 3 deleted 250 characters in body; edited tags

How can I compare two files line by line?

I have two files A and B which are almost same with some lines different and with some lines jumbled. Since the two files are systemverilog files the lines also contain special characters like ; , = + and etc.

I want to loop through each line of fileA and check if there is a corresponding match in fileB. The comparison should follow the rules

  1. Whitespaces at the beginning and end of the line can be ignored.
  2. Multiple Space/Tab between words can be considered as single Space.
  3. Empty lines can be ignored

The result should display the lines that are present in fileA but not in fileB.

I tried tkdiff but since some lines are jumbled it shows many differences.