No announcement yet.

file rules - unimportant regular expressions

  • Filter
  • Time
  • Show
Clear All
new posts

  • Aaron
    Re: file rules - unimportant regular expressions

    String Literals are considered Important Text. Instead, add your rule to the above Unimportant Text section, and it should work as you expect. You can toggle Ignore Unimportant Text (squiggly equals sign in the upper left) to see it color/not color the Unimportant Differences.

    Also, does your rule need to be as complicated (. = p, then A-F characters), or would an objectRef=" to " deliminated Rule suffice?

    Leave a comment:

  • adblockfreak
    started a topic file rules - unimportant regular expressions

    file rules - unimportant regular expressions

    I have some XML files I need to compare while ignoring unique IDs within the file. For example, if I have these two lines (one on each side), I want them to be a "match":

    <fieldInstance blah blah blah objectRef="p997C1F9F2D6240DCBDB795BC3ACB8C58" />
    <fieldInstance blah blah blah objectRef="pD4522DE71BF04975BA323B134AAD7BE5" />

    So I created a new set of rules for *.* and then under Edit Current Rules, I went to the Importance tab and added this rule:
    String Literals: Regular Expression: objectRef=".[0-9A-F]*?"
    I thought this would make it count those lines as unimportant if the objectRef value didn't match. But they are still highlighted in red.
    I even tried simplifying the regex down to objectRef=".*" - no luck.
    What am I doing wrong?