Share via

MS Word find and replace change part only

Anonymous
2024-03-01T07:01:18+00:00

Hi there,

My text is:

46:27 dfgdfgdgdfg 47:50 fdgdfgdsgdsfg 48:22 gdfgsdfgdgf 49:45 sdfgsdfgdffdg

and I want to replace each spaces in front of each time stamp by a carriage return:

46:27 dfgdfgdgdfg

47:50 fdgdfgdsgdsfg

48:22 gdfgsdfgdgf

49:45 sdfgsdfgdffdg

What statment is correct in Find and replace to have this result ?

Thanks by advance

Bruno

Microsoft 365 and Office | Word | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. HansV 462.6K Reputation points MVP Volunteer Moderator
    2024-03-01T11:46:11+00:00

    Select the text.

    Press Ctrl+H to activate the Replace dialog.

    Click 'More >>' to display the options.

    Tick the check box 'Use wildcards.

    In the 'Find what' box, enter a space followed by ([0-9])

    In the 'Replace with' box, enter ^p\1

    Click 'Replace All'.

    1 person found this answer helpful.
    0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Anonymous
    2024-03-01T14:53:48+00:00

    Very nice, thanks Hans ;-)

    0 comments No comments
  2. HansV 462.6K Reputation points MVP Volunteer Moderator
    2024-03-01T14:11:43+00:00
    0 comments No comments
  3. Anonymous
    2024-03-01T13:58:30+00:00

    I suppose ^p is for carriage return and \1 is to keep the caracter in find, I can see also ^is for negation in regex

    Do you have a link for a tutorial ? I am looking for but nothing interesting ;-(

    Thanks

    0 comments No comments
  4. Anonymous
    2024-03-01T13:41:57+00:00

    Works great, thank you so much Hans !!!

    0 comments No comments