I am using Regex (.*BankName.*>)(.*)(</.*)
for finding & replacing it with \1\2,HDFC\3
in a file containing text as shown below:
<BankName>ICICI</BankName></not>
<BankName>ICICI</BankName>
</not>
when I click 'replace all', I get something like this in file:
<BankName>ICICI</BankName>,HDFC</not>
<BankName>ICICI,HDFC</BankName>
</not>
I am not able to understand the behaviour for the first line, why is it not placing ",HDFC" within BankName tag. Below are attached screenshot if Anyone needs them.
Before Pressing "Replace all":
Few More examples:
Before "Replace all":
<BankName>ICICI</BankName></not>
<BankName>ICICI</BankName>
</not>
<visibility name="BankName">ICICI</visibility></not>
<visibility name="BankName">ICICI</visibility>
</not>
After "Replace all": ICICI,HDFC
<BankName>ICICI,HDFC</BankName>
</not>
<visibility name="BankName">ICICI</visibility>,HDFC</not>
<visibility name="BankName">ICICI,HDFC</visibility>
</not>
I have built the regex i.e.(.*BankName.*>)(.*)(</.*)
keeping in mind the data shown above.