please I have 15000 lines such as :
PCOMPG 1 -45.77 0. 0.
PCOMPG 2 -38.88 0. 0.
PCOMPG 3 -27.76 0. 0.
PCOMPG 4 -33.81 0. 0.
and so on....
I need to replace them by something like this:
PCOMPG 1 0. 0.
PCOMPG 2 0. 0.
PCOMPG 3 0. 0.
PCOMPG 4 0. 0.
repecting the alineations. How could I do it?
Thank you very much
unable to replace
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
if you mean that you would like to replace e.g -45.77 (6 characters) with blanks you can useThe issue is that I need to delete the second amount in the secuence of four and not to modify the place of the other numbers. When I write (PCOMPG [0-9]) [^ ]+ it doesn´t work.
replace
(PCOMPG [0-9]) [^ ]+(.*)
with
\1 \2
note: there are 7 blanks between \1 and \2 => copy this but be careful not to have additional blanks at the end of the string
settings like Ben Josephs explained