I have two fields that I know do not match. Is there a formula or regex that can identify what the different characters are between the two fields? For example:
Input #1 | Input#2 | Formula/Regex Output |
ABCDE | BCD | AE |
CDE | AB | ABCDE |
ABC | ABC | |
BCD | ABCDE | AE |
Thanks in advance!
Paul
Follow these instructions:
1) RecordID
2) regex (tokenize mode) - split to rows. in your token put a single . - do this for column 1.
3) connect a second regex tool to your RecordID - repeat what you did for column 1 - but do it for column2.
4) Join. Join on Record ID - and whatever you're token name is.
5) do you see your left and right anchors from your join output? those are unmatched. Add them to a union tool.
6) Attach a summarize tool. group by recordID - your Regex field - set that in Concatenate mode with no delimiter.
try this yourself and post if you are having issues.
Would definitely recommend @apathetichell's approach if you want something that is more 'reader friendly' to others picking up the workflow etc as that will create an easy-to-follow flow/process. There is an alternative way as follows though, whereby we use each of the 2 fields as a lookup group of characters to replace any of those found in the other field with '' i.e. nothing. Doing this both ways round creates a list of characters that aren't common across the 2 fields: