Reputation: 3612
How can I replace: for example PL SQL function call,
htp.formRadio('name', 'value', 'checked');
to be
<input type="radio" name="name" value="value" checked>
using vim search and replace regex?
Thank You
Upvotes: 0
Views: 384
Reputation: 754160
:s/htp.form\([A-Z][a-z]*\)('\([^']*\)', '\([^']*\)', '\([^']*\)');/<input type="\L\1\E" name="\2" value="\3" \4>/
Subject to not having made any typos. The pattern '\([^']*\)'
is repeated and captures what's inside the quotes in the call.
Upvotes: 4