I have big xml in java object. And I want to replace
<countryChannel countryCode="CountryCode"/>
with
<countryChannel countryCode="CountryCode" active="true"></countryChannel>
Here is samle xml (input)
</articleMedia>
<channels>
<countryChannel countryCode="CountryCode"/>
</channels>
</articleMedia>
<channels>
<countryChannel countryCode="CountryCode"/>
</channels>
</articleMedia>
<channels>
<countryChannel countryCode="CountryCode"/>
</channels>
May I know please using regex how can I select only "/>" portion of all strings preceding by countryChannel countryCode="CountryCode" ?
I have one regex which only selects the whole strings https://regex101.com/r/NLHy2Y/1, but how can I select only all "/>" preceding by "countryChannel countryCode="CountryCode"" ?