Reputation: 13
I have a long list of HTML tags like the following:
<option>text 1</option>
<option>text 2</option>
etc...
I wish to use Notepad++ to make my list look like the following:
<option value="text 1">text 1</option>
<option value="text 2">text 2</option>
Thanks
Upvotes: 1
Views: 296
Reputation: 19842
As far as a regex find/replace, try this:
Find: <option>([\w\s]+)</option>
Replace: <option value="\1">\1</option>
Upvotes: 0
Reputation: 3113
Use a regular expression?
Find: <option>([^<]+)</option>
Replace: <option value="\1">\1</option>
Then use individual find/replace so you don't accidentally clobber something you didn't intend to.
Upvotes: 3
Reputation: 16677
create a macro.
this looks like a nice repeating keystroke sequence.
Upvotes: 0