I think I need a real 'regular expression' guru here ...
using this data ( = escape char):
(15Y(s1p12v0s0b0T*757540097970*(10U&l6D(s0p11h0s0b4099T
I apply the following 'awk' rule:
/\033.*\*/ { sub(/\033.*\*/,""
}
In my experience, this should locate a line with the target data and then
delete the data beginning with the left-most escape character up thru the
FIRST '*'. The target lines are properly located but when the 'sub'
function is run, the data is deleted thru the second '*'. I am sure the
second (escaped) '*' in the replacement function is getting the regular
expression handler confused but I cannot seem to find out how to correct
the substitution so it can work properly.
I would appreciate anyone's insight ...
using this data ( = escape char):
(15Y(s1p12v0s0b0T*757540097970*(10U&l6D(s0p11h0s0b4099T
I apply the following 'awk' rule:
/\033.*\*/ { sub(/\033.*\*/,""
In my experience, this should locate a line with the target data and then
delete the data beginning with the left-most escape character up thru the
FIRST '*'. The target lines are properly located but when the 'sub'
function is run, the data is deleted thru the second '*'. I am sure the
second (escaped) '*' in the replacement function is getting the regular
expression handler confused but I cannot seem to find out how to correct
the substitution so it can work properly.
I would appreciate anyone's insight ...