what will be the regex for this?

headboy

New Member
I have an xml file which I am editing manually. The xml file structure is as follows:\[code\]<order> <id>1</field> <current_execution_status>REGENERATED</field> <generated_time>2012-12-01 17:55:00</field> <generation_status>UNKNOWN</field> <priority>0</field> <type>NORMAL</field> <assigned_vehicle>1</field> <assigned_drop_location>1</field> <assigned_pick_location>1</field> <generation_by_user_name>ABC</field> <material>1</field> <order_cancel_detail /> <order_drop_detail /> <order_pick_detail /></order>\[/code\]I wanted to replace each occurrence of \[code\]field\[/code\] with respective "field names" from in front of the values. For e.g. \[code\]<id>1</field>\[/code\] should become \[code\]<id>1</id>\[/code\], \[code\]<current_execution_status>REGENERATED</current_execution_status>\[/code\], etc. like this way. But not getting what should be my regex for this in \[code\]vim\[/code\].
 
Back
Top