I would like to find out if there are "duplicate" text-fragment between two specific lines.
For example i would like to find out that in the first "TestMethod" there is twice the "TC.Requirement" set.
[TestMethod()]
[TestProperty(TC.Name, "")]
[Description("A test for ")]
[TestProperty(TC.InternalTcId, "2c80e355-c156-4fd1-ba10-bdfb50f67828")]
[Owner("")]
[TestProperty(TC.CreationDate, "")]
[TestProperty(TC.Requirement, "1111")]
[TestProperty(TC.PostCondition, "")]
[TestProperty(TC.PreCondition, "")]
[TestProperty(TC.Types, TCType.Normal_Case)]
[TestProperty(TC.Requirement, "2222")]
[TestProperty(TC.ReviewDate, "")]
public void ATest()
{
Assert.IsNotNull(target);
}
[TestMethod()]
[TestProperty(TC.Name, "")]
[Description("A test for ")]
[TestProperty(TC.InternalTcId, "8d00d256-86fe-4a08-864c-6f1bf38581ce")]
[Owner("")]
[TestProperty(TC.CreationDate, "")]
[TestProperty(TC.PostCondition, "")]
[TestProperty(TC.PreCondition, "")]
[TestProperty(TC.Types, TCType.Normal_Case)]
[TestProperty(TC.Requirement, "3333")]
[TestProperty(TC.ReviewDate, "")]
public void BTest()
{
Assert.IsNotNull(target);
}
In the first TestMethod there is a doubled Requirement-aatribute, in the second TestMethod there isn't a second.
Could you help me find out the regex for that search?
Thank you :-)