regex to replace /swap the option value with the text in select -


i have ton of tedious options edit , while know several regex commands , tricks, i'm not able figure out how following:

problem:
business team wants me go in swap out name , value reverse

so instead of:

<option value="miller keisha s">keisha.miller@company.com</option> 

i want use notepad++ or whatever else , get

<option value="keisha.miller@company.com">miller keisha s</option> 

i know $ end , ^ beginning forward , backslashes etc...

so know want find in value=" , ends "> , replace starts "> , ends

i looking @ other stackoverflow questions , https://www.regex101.com/

search for:

<option value="([^"]+)">([^<]+)<\/option> 

replace with:

<option value="$2">$1</option> 

demo


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -