Hi Monks,
i want to remove the certain log lines if its starts with -- or remove the words after the --, but if it is present within the double quotes(" test -- done")then no need of substitution.
for Example :
line1: -- test the line,8,description; (Need to remove the line)
line2:test the line,8,description="testing -- done"; (No need)
line3: test the line,8,description="testing -- done"; -- commented line (need to remove the words after the -- symbol)
if i remove with s/(?<!\").*--.*(?<!\")//g its not working,ca n anyone help me?
In reply to regex match only outside the double quotes by hifirock
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |