-1

I'm currently searching for a solution to highlight all lines with the exact same value side by side in a single line of a huge textfile.

What the data looks like is:
000xxxxx 000xxxxx
002xxxxx 000xxxxx
000xxxxx 001xxxxx
000xxxxx 000xxxxx

I want to highlight all lines where the first value matches the second value (both are unknown). So the result of my example should look like this:
000xxxxx 000xxxxx
002xxxxx 000xxxxx
000xxxxx 001xxxxx
000xxxxx 000xxxxx

The number of spaces between the two values differ.

Thanks in advance :)

1 Answers1

-1

If I'm understanding correctly and the 'x's are supposed to represent a string of spaces of unknown length, you can do it with a backreference:

(?<dup>00\d) +\k<dup>
Arcaeca
  • 227
  • 3
  • 15