The solution you asked for is to use a regular expression. You want to find:

`([^ ]*)(.*)(31117*)`

and replace it with:

`\1 \3`

This defines three groups (each is enclosed in the parentheses). The first group is zero or more non spaces; so this is everything leading up to, but not including the first space. The second group can be any number of any characters, so long as it does not start with 31117; so this is the first space and anything that follows, so long as it is not 31117. The third group is anything that starts with 31117.

Note that @DavidPostill is correct. Getting rid of everything after the first space and before the 31117 in this:

`0918526582;0918526590 (pbk.) 31117005925677`

is indeed:

`0918526582;0918526590 31117005925677`

If you misstated what you want and you really do want this:

`0918526582;0918526590 (pbk.) 31117005925677`

to become this:

`0918526582 31117005925677`

Then you need to modify the regular expression thusly:

`([^; ]*)(.*)(31117*)`

This adds a semicolon to the first group: any number of any characters not a space or a semicolon.

`0918526582;0918526590 (pbk.) 31117005925677`

does not result in`0918526582 31117005925677`

if the rule is "delete everything after the first space and before the number that begins with 31117". This rule would result in`0918526582;0918526590 31117005925677`

– DavidPostill♦ Feb 4 '15 at 22:09