0

Convert below format to CSV

Audit : Site \BaseObje
Disabled
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\AuditBaseObjects
DCOM: Machine Launch Restrictions
Not defined
HKEY_LOCAL_MACHINE\Software\policies\Microsoft\windows NT\DCOM\Machine Launch Restriction

to

Audit : Site \BaseObje, Disabled, HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\AuditBaseObjects
DCOM: Machine Launch Restrictions, Not defined, HKEY_LOCAL_MACHINE\Software\policies\Microsoft\windows NT\DCOM\Machine Launch Restriction

after HKEY_LOCAL_MACHINE line every record is new line

Anand
  • 1
  • Looks like you are looking to create a regex, but do not know where to get started. Please check [Reference - What does this regex mean](https://stackoverflow.com/questions/22937618) resource, it has plenty of hints. Also, refer to [Learning Regular Expressions](https://stackoverflow.com/questions/4736) post for some basic regex info. Once you get some expression ready and still have issues with the solution, please edit the question with the latest details and we'll be glad to help you fix the problem. – Wiktor Stribiżew Apr 14 '20 at 20:47
  • I have tried all the ways, which I can.... but didn't find solution to above... – Anand Apr 14 '20 at 20:56
  • This regex will do the job, just tested it myself .... Find what: `\R(?!dcom)` → Replace with: `, ` a comma and a space ..... – Haji Rahmatullah May 30 '21 at 01:31

0 Answers0