Input
Noptx(5) // remain the same
-*Nop(3);
Nop(9);
--Nop(8); // remain the same d3
**---Nop(7); //remain the same d3
**---Nop(7);
*--Nop(6);
--**Nop(5);
-Nop(4);
Nop(3);
represents a space
represents a tab space
Desired OUPUT
Noptx(5) // remain the same
-*Nop(6);
Nop(18);
--Nop(8); // remain the same d3
**---Nop(7); //remain the same d3
**---Nop(14);
*--Nop(12);
--**Nop(10);
-Nop(8);
Nop(6);
I want to change the no to two times but which matches the below patteren
CASE-1: Zero or more spaces/tabs then Nop AND
CASE-2: The line should not end with d3 .
Basically if both patteren matches then double the no inbetween ()
Previously I ve a suggestion but that wont work for the first statement in my input file
Noptx(5) // remain the same
-*Nop(6);
Nop(18);
--Nop(8); // remain the same d3
**---Nop(7); //remain the same d3
**---Nop(14);
*--Nop(12);
--**Nop(10);
-Nop(8);
Nop(6);
Edit: In your original post you gave a sample file where you said
So you would need to change the "@-" in the above code.