The output is ABC: 456
Then the echo "ABC: cde; "123-456 | sed - r 's/(+) [^ :] (; . * :) ([^ :] + $)/, 3, 3, 3 '
The output is ABC: 456456456
This is why? According to the understanding of the third group should be 456?
CodePudding user response:
The group is not right, ([^ :] +) is ABC (; . * :); 123: ([^ :] + $) is 456, that: cdeCodePudding user response:
Then you, so could not put the ABC: into account, the cde is group 1; 123: grouping is 2, 456 in group 3CodePudding user response:
Well, the problem is a separate output a third group is ABC: 456, but a continuous output 3 phase three groups become ABC: 456456456; Here is a little hard to understand, ([^ :] + $) should match is: right, this should be a matching 456?CodePudding user response: