I am trying to replace / to null, like this
<h:graphicImage id="">
My code below.
<h:graphicImage id=""/>
<a>
<b>
<rich:componentControl target=""/>
<a>
<b>
</h:graphicImage>
The regex I used,
(<h:graphicImage[^>]*\s*)/>[\s\S]<rich:componentControl[^>]*)
It works if there no tags or content between the two tags but unfortunately in my code, there many tags between them. Any solution?
<h:graphicImage id=""/>
<rich:componentControl target=""/></h:graphicImage>
Edit
To be more clear about my question, I would like to replace
<h:graphicImage id=""/>
to
<h:graphicImage id="">
when h:graphicImage tag has rich:componentControl this tag.
the code is like this below
<h:graphicImage id=""/>
<a>
<b>
<rich:componentControl target=""/>
<a>
<b>
</h:graphicImage>