-1

I would like to convert this:

ATOM   6990  CB  ILE A 1028     -0.558  90.754  9.341  0.00  0.00    +0.015 C
ATOM   6991  CB  ILE A 1028     -0.558  90.754  19.341  0.00  0.00    +0.015 C

Into this:

ATOM   6990  CB  ILE A 1028     -0.558  90.754   9.341   0.00  0.00    +0.015 C
ATOM   6991  CB  ILE A 1028     -0.558  90.754  19.341   0.00  0.00    +0.015 C

I tried using lookahead but my simple alteration to the current answer did not work for me. As i have a lot of similar anomalies i have to use regex.

falldses
  • 31
  • 4

2 Answers2

0
\d+(\s+)

Decimal digits followed by whitespace in a capturing group.

askaroni
  • 753
  • 2
  • 8
0

If the number of digits be fixed, e.g. at 5, you could use a fixed width positive lookbehind followed by some sort of capture group, e.g.

(?<=[0-9]{5})(\s+)
Tim Biegeleisen
  • 387,723
  • 20
  • 200
  • 263