-1

Hello I am working to find difference between the core code my company has produced as product and code that our client database contains. I am doing this with Beyond Compare. At some point along the way our client has used a different IDE to look at code and recompile it. The problem is that the only difference is in the create or replace statement being sent to Oracle.

So my company's source looks like:

create or replace trigger Trigger_tg_1

And the customers compiled source looks like:

create or replace trigger "SCHEMA"."TRIGGER_TG_1"

Both of these are the same to Oracle but are flagged as a difference in Beyond Compare. How would I write a regular expression to ignore these differences?

K Leikam
  • 11
  • 2
  • What do you mean by using a regular expression to ignore differences? Does it allow you to perform a regexp replace to convert the input to a common format before comparing? – Barmar Jul 14 '16 at 20:34
  • What have you tried? SO is not a free coding service. You have to try to solve the problem yourself, and if you can't get it working post your attempt and we'll try to help. – Barmar Jul 14 '16 at 20:35
  • Beyond Compare allows you to create "Grammar" rules that will ignore differences that match certain criteria. These rules that cam be configured can include a regexp for what to ignore. I have tried excluding all lines that begin with create or replace and not matching case but it is still flagging the lines if they have the schema name in quotes. I was hoping for some regex help but don't know where to begin. – K Leikam Jul 14 '16 at 20:50
  • By setting up two rules in the file compare rules I was able to achieve this. 1) Create a unimportant text regular expression of ^create or replace and 2) Create a grammar rule for an important line when it starts with "create or replace" and then turn that rule off. When only creating the first rule for unimportant text it doesn't ignore the line and I am not sure why. – K Leikam Jul 14 '16 at 21:33

1 Answers1

1

By setting up two rules in the file compare session setting rules I was able to achieve this.

1) Create a unimportant text regular expression of ^create or replace and 2) Create a grammar rule for an important line when it starts with "create or replace" and then turn that rule off.

When only creating the first rule for unimportant text it doesn't ignore the line and I am not sure why.

K Leikam
  • 11
  • 2