0

Thank you in advance and sorry for the bad english!

windows7+vscode Version: 1.27.1

With vscode, I tried this

input----------------------------------------------
<aaa>001</aaa>
<bbb>002</bbb>
<ccc>003</ccc>

operation------------------------------------------
Ctrl+Shift+F
SEARCH
^(<aaa>)(.*)(</aaa>)(.*)$|^(<bbb>)(.*)(</bbb>)(.*)$

output---------------------------------------------
1,1: <aaa>001</aaa>
2,1: <bbb>002</bbb>

please tell me

I wnat operation one liner

I want output ---> 0001,002

SEARCH? from aaa to b

ーーーーーー 2018ー9ー17

Find: ^(?!.(aaa|bbb)).$

Replace: leave empty

Find:.(.)\n.(.)\n

Replace: $1,$2

I can not one liner  

asterrlsk disappeared

1
  • (?<=<aaa>).*(?=</aaa>)|(?<=<bbb>).*(?=</bbb>) Sep 12, 2018 at 23:14

1 Answer 1

2

This should work, it is two separate find & replace actions, both use the regular expression option.

Find: <.*?>|</.*?>

Replace: leave empty


Find: $\n

Replace: ,

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.