Regular expression syntax tested with Visual Studio Code (Dec 2019)
Goal: transform:
Connect(
ID_BUTTON1, wxEVT_COMMAND_BUTTON_CLICKED,
(wxObjectEventFunction)&CDlgCalibWizardOnline::OnbtnStartClick);
into:
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CDlgCalibWizardOnline::OnbtnStartClick, this, ID_BUTTON1);
regex groups:
$1: ID $2: event $3: functor
regex "search for" expression:
Connect\([\n\s]*([a-zA-Z_0-9\s|]*)[\n\s]*,[\n\s]*([a-zA-Z_0-9]*)[\n\s]*,[\n\s]*.*&(.*)[\n\s]*\);
regex "replace with" expression:
Bind($2, &$3,this, $1);