I'm looking for a way to align based on a strictly comparison of part a line. For example,
FILE1:
cat=1
dog=1
horse=1
FILE2:
cat=1
frog=1
horse=1
BC partial matches dog to frog and aligns them, but as variables these are completely different. Thus, I'd like a strict comparison that says if some expression does not match, like (^\w+=), then lines should not align.
Is this possible? Seems like there should be a "Strict" checkbox for grammar. Or better yet, strictly match only part of a RegEx by allowing users to specify which groups of the RegEx must match. E.g., set (^\s*)(\w+)(\s*=) then specify a strict match only on $2, which, assuming my noob RegEx is right, should exactly match the word between the start of a line and the first equal sign, ignoring any differences in leading & trailing spaces.
This could improve alignment for everything, like ensuring "if orange = 1" doesn't partial match and align to "for range = 1 to 10", which is obviously completely different code.
FILE1:
cat=1
dog=1
horse=1
FILE2:
cat=1
frog=1
horse=1
BC partial matches dog to frog and aligns them, but as variables these are completely different. Thus, I'd like a strict comparison that says if some expression does not match, like (^\w+=), then lines should not align.
Is this possible? Seems like there should be a "Strict" checkbox for grammar. Or better yet, strictly match only part of a RegEx by allowing users to specify which groups of the RegEx must match. E.g., set (^\s*)(\w+)(\s*=) then specify a strict match only on $2, which, assuming my noob RegEx is right, should exactly match the word between the start of a line and the first equal sign, ignoring any differences in leading & trailing spaces.
This could improve alignment for everything, like ensuring "if orange = 1" doesn't partial match and align to "for range = 1 to 10", which is obviously completely different code.
Comment