Can you please help to write regex for below current format to expected format.
Current format data:
web_add_auto_header("Origin",
"http://eesere6090582.loot.welcome.com:8888");
web_add_auto_header("Wicket-Ajax",
"true");
web_add_auto_header("Wicket-Ajax-BaseURL",
"servers?1");
web_add_auto_header("Wicket-FocusedElementId",
"id40");
web_add_auto_header("X-Requested-With",
"XMLHttpRequest");
Expected format:
web_add_auto_header("Origin","http://eesere6090582.loot.welcome.com:8888");
web_add_auto_header("Wicket-Ajax","true");
web_add_auto_header("Wicket-Ajax-BaseURL","servers?1");
web_add_auto_header("Wicket-FocusedElementId","id40");
web_add_auto_header("X-Requested-With","XMLHttpRequest");
Use regex ^(web_add_auto_header.*,)\n\s*
with replacement $1
.
It will replace newlines after strings beginning with web_add_auto_header
.
Here is demo at regex101.