I have a consistently formatted lines that are essentially delimited field/value pairs and I need to use a single regex expression to compare the values of two fields and match if they are the same. I don't need the values, just the match/no match comparison. Here are two examples, the first should match the second should not.
- @@field1@@someValue@@field2@@someValue@@otherField@@otherValue
- @@field1@@someValue@@field2@@someDIFFERENTValue@@otherField@@otherValue
I can match any field or value on a known pattern, and I can use lookarounds to do AND operations.
But I don't know how to extract and save the value of some pattern match, like field1@@(.*?)@@
, and then use that "someValue" in an expression comparing it to the "contents" of field2@@(.*?)@@
Thanks in advance for any assistance.