-1

Thank you in advance and sorry for the bad english!

What I have tried:

DXF file

Find: \r\n

Replace: @@@

Find: (.*)(?=ENTITIES)

Replace: $2

Find: @@@

Replace: \n

Find: ENTITIES

Replace: 0\nSECTION\n2\n\ENTITIES

replace - Currently 4 times

I want to replace only once

mrrclb48z
  • 207
  • 2
  • 13
  • How could you run `(.*)(?=ENTITIES)` -> `$2` replacement? There is no Group 2 in your pattern. Please clarify in words what you are doing and supply a sample text + expected output. I understand you are using Notepad++? – Wiktor Stribiżew Sep 30 '18 at 11:54

1 Answers1

0

(AWK)

BEGIN{isw=0;print"  0";print"SECTION";print"  2";}
/^ENTITIES$/{isw=1}
isw==1{print $0}
mrrclb48z
  • 207
  • 2
  • 13
  • Simply posting some code isn't terribly helpful. Can you explain your code? That way others can understand and learn from your answer instead of just copying & pasting some code from the web. – Robert Oct 01 '18 at 16:36