Hi guys, I'm having problems figuring out a replace statement or to be precise, how not to replace something under certain conditions.
This is the text I'm searching:
This is my search expression:
This is the replace expression:
When it is ran, I get the following:
I would like the regexp to not do a replace name= if the match already has a value= ... Any ideas?
Any help would be much appreciated, I don't have regexp down all that well yet.
This is the text I'm searching:
Code:
<input width="20" name="name1" value="hey">
<input width="20" name="name2">
This is my search expression:
Code:
<(?<start>([A-z0-9]+))(?<junk>[^>]+)(?<style>style=")(?<junk2>([^"]+))(?<end>")
This is the replace expression:
Code:
<${start}${junk}class="${start}001${end}
When it is ran, I get the following:
Code:
<input width="20" value="input001" value="hey">
<input width="20" value="input001">
I would like the regexp to not do a replace name= if the match already has a value= ... Any ideas?
Any help would be much appreciated, I don't have regexp down all that well yet.