Hello Community,
I have a file, with some data.
I need the regex that matches a text only within the Title=“”, but ignore if the text is within square brackets, and not others for ex. Link, BreakType etc
The word i want to match is Color.
Input:
<TocEntry
Title="Color"
Title=["Color"]
Link="/Content/Color/"
BreakType="Color"
StartSection="false"
PageNumberReset="Color">
</TocEntry>
<TocEntry
Title="Colord">
//there could be Link="abc", BreakType="abc" here aswell
</TocEntry>
<TocEntry
Title="dColord">
</TocEntry>
<TocEntry
Title="my fav Color is red">
Title=["my fav Color is red"]>
</TocEntry>
Output:
<TocEntry
Title="Color" - Highlight this text Color
Title=["Color"] - Ignore this text Color
Link="/Content/Color/" - ignore this text Color
BreakType="Color" - ignore this text Color
StartSection="false"
PageNumberReset="Color"> - ignore this text Color
</TocEntry>
<TocEntry
Title="Colord"> - ignore this text Colord
//there could be Link="abc", BreakType="abc" here aswell
</TocEntry>
<TocEntry
Title="dColord"> - ignore this text dColord
</TocEntry>
<TocEntry
Title="my fav Color is red"> - Highlight this text Color
Title=["my fav Color is red"]> - - ignore this text Color
</TocEntry>