The problem I have is that is trying to match both sets of delimiter (above and below)
I'm trying to match only the second part of the delimiter below (bolded).
This is so I can add a new version made on the same day to multiple files. Using perl, so I can get a result like this when I make the replacement
How ever according to https://regex101.com/ (and my experience when I ran the command) it selects both sets of delimiters,
making a replacement above and below.
This is the RegEx I'm using
(?!V[0-9]{2}.[0-9]{2}.[0-9]{4}.1)(.*=.$)
And the comand in UNIX:
perl -pe 's#(?!V[0-9]{2}.[0-9]{2}.[0-9]{4}.1)(.*=.$)#-* V02.11.2020.1 11/Feb/2020 Author2 Minor Changed Include lms \n -* ================ ============= ==================== =========== ========================================================/#g' path/to/file
Is there a way to select the one below? Or the problem originates from the Negative Lookahead?
-**********************************************************************
EDIT
I used the command selected by bey0nd
3,$s/ -\* =[=[:space:]]*\// -* V02.11.2020.1\t 11\/Feb\/2020\t Author2\t\t Minor\tChange include 1ms\n\0/1
It helped a lot with readability
But I'm still getting both delimeters (= signs) repalced. I thought that the lookaround function of regex would've helped
I'm using perl 5 and sed 4.2
At least I got it to work in regex101.com, but in my version didn't work
Hope someone finds it useful
(-\* =[=[:space:]]*\/)(?!\n.-\*[[:space:]].V[0-9]{2}.[0-9]{2}.[0-9]{4}.1*)