I have numerous text files that contain the following values at the beginning of various lines:
22;xxxx;x;x;..........
I want to replace specific values between each semi-colon for every occurrence regardless of the current values.
I find the records just fine using regular expressions as follows:
\n22;*;*;*;
but when I try to replace the values I want they are inserted rather than replacing the values.
Example: Found 22;XXXX:YY;Z; replace = \n22;AAAA;BB;C;
updated data 22;AAAA;BB;C;XXXX;YY;Z
I'm sure its a simple solution, but I can't seem to find it.
Thanks
What am I missing???
OK That updated the data correctly, but I lost everything after the 4th semi-colon. Sorry if I wasn't clear, but what I need it to replace the data specified, but leave the rest of the record untouched. For example,
Current record 22;aaaa;bb;c;ddddd;fffff;ggggg;hhhh;
Find \n22;.*;.*;.*;
Replace \n22;xxxx;yy;z;
Expected new record 22;xxxx;yy;zz;ddddd;fffff;ggggg;hhhh;
Current record 22;aaaa;bb;c;ddddd;fffff;ggggg;hhhh;
Find \n22;.*;.*;.*;
Replace \n22;xxxx;yy;z;
Expected new record 22;xxxx;yy;zz;ddddd;fffff;ggggg;hhhh;