inverted subpattern
Posted: Tue May 07, 2013 6:17 pm
Hello.
I need to find lines containing different numbers at the end. Numbers must not be equal. For example:
This regexp is not working.
I can find lines with equal numbers:
But how to find lines with different numbers?
And more one question.
Is there an option which could replace found pattern with counter? Counter is a variable that changes in increment of one in every replace. The initial value equals to zero. Seen this option in another software.
I need to find lines containing different numbers at the end. Numbers must not be equal. For example:
Code: Select all
anyword 33
anyword 45
Code: Select all
anyword\s+(\d+)\s+anyword\s+(?!\1)
Code: Select all
anyword\s+(\d+)\s+anyword\s+\1
And more one question.
Is there an option which could replace found pattern with counter? Counter is a variable that changes in increment of one in every replace. The initial value equals to zero. Seen this option in another software.