Hi i am trying to write a regular expression for matching and replacing below strings using Notepad++
<mycomponent id="Myvalue1.013D0E13-BF5F-4D0F-AAFA-FA4B120DE3E9" test="my" value="1234"/>
<mycomponent id="Myvalue3.013D0E13-BF5F-4D0F-AAFA-FA4B120DE3E9" kv="ggg" propert="null"/>
<mycomponent id="Myvalue5.013D0E13-BF5F-4D0F-AAFA-FA4B120DE3E9" fff="ddd" key="kk"/>
<mycomponent id="Myvalue7.013D0E13-BF5F-4D0F-AAFA-FA4B120DE3E9" dfd="drgf"/>
I want to replace 013D0E13-BF5F-4D0F-AAFA-FA4B120DE3E9 from these string and result should be as given below
<mycomponent id="Myvalue1" test="my" value="1234"/>
<mycomponent id="Myvalue3" kv="ggg" propert="null"/>
<mycomponent id="Myvalue5" fff="ddd" key="kk"/>
<mycomponent id="Myvalue7" dfd="drgf"/>
I used the below RE for matching and replacing
(<mycomponent id=".*?\.013D0E13-BF5F-4D0F-AAFA-FA4B120DE3E9)\S+
as the find sting and $1 as the replace string. Eventhought the find is working the replace is not working
.*?\.and you have this question answered.$1", while you're using$1.