Replace spaces with colon (:) in Notepad++?











up vote
2
down vote

favorite
1












Suppose (this is sample data) I have these lines:



A                          W
BAKER X
CANDLESTICKMAKER Y
DOGCATCHER Z


I want to change the whitespace to colons, like this:



A:W
BAKER:X
CANDLESTICKMAKER:Y
DOGCATCHER:Z


How can I achieve this in Notepad++?










share|improve this question




















  • 1




    Thanks for the clarifying edits to the question, at first I thought it was a simple Ctrl+H replace!
    – Celeritas
    Jun 2 '14 at 20:08















up vote
2
down vote

favorite
1












Suppose (this is sample data) I have these lines:



A                          W
BAKER X
CANDLESTICKMAKER Y
DOGCATCHER Z


I want to change the whitespace to colons, like this:



A:W
BAKER:X
CANDLESTICKMAKER:Y
DOGCATCHER:Z


How can I achieve this in Notepad++?










share|improve this question




















  • 1




    Thanks for the clarifying edits to the question, at first I thought it was a simple Ctrl+H replace!
    – Celeritas
    Jun 2 '14 at 20:08













up vote
2
down vote

favorite
1









up vote
2
down vote

favorite
1






1





Suppose (this is sample data) I have these lines:



A                          W
BAKER X
CANDLESTICKMAKER Y
DOGCATCHER Z


I want to change the whitespace to colons, like this:



A:W
BAKER:X
CANDLESTICKMAKER:Y
DOGCATCHER:Z


How can I achieve this in Notepad++?










share|improve this question















Suppose (this is sample data) I have these lines:



A                          W
BAKER X
CANDLESTICKMAKER Y
DOGCATCHER Z


I want to change the whitespace to colons, like this:



A:W
BAKER:X
CANDLESTICKMAKER:Y
DOGCATCHER:Z


How can I achieve this in Notepad++?







notepad++ regex






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 2 '14 at 19:22









Scott

15.4k113789




15.4k113789










asked Jun 2 '14 at 16:47









Farid

11112




11112








  • 1




    Thanks for the clarifying edits to the question, at first I thought it was a simple Ctrl+H replace!
    – Celeritas
    Jun 2 '14 at 20:08














  • 1




    Thanks for the clarifying edits to the question, at first I thought it was a simple Ctrl+H replace!
    – Celeritas
    Jun 2 '14 at 20:08








1




1




Thanks for the clarifying edits to the question, at first I thought it was a simple Ctrl+H replace!
– Celeritas
Jun 2 '14 at 20:08




Thanks for the clarifying edits to the question, at first I thought it was a simple Ctrl+H replace!
– Celeritas
Jun 2 '14 at 20:08










2 Answers
2






active

oldest

votes

















up vote
5
down vote













Replace + ( followed by +) with ::



enter image description here



Make sure Regular expression is checked.



As igalvez pointed out in his comment, you might want to use ( |t)+ to also match t (the tab character).



One might want to use s to match all whitespace, but that will also match the line breaks and condense your whole data to a single line.






share|improve this answer



















  • 1




    Not Working
    – Farid
    Jun 2 '14 at 16:58






  • 1




    @OliverSalzburg nope
    – Farid
    Jun 2 '14 at 17:04






  • 1




    @Farid I'm shub ;) Add the space and it should work :)
    – ᔕᖺᘎᕊ
    Jun 2 '14 at 17:04






  • 1




    I made space using "spacebar" for two lines..and made space using "Tab" for other two lines....this didn't work with Tab spaced lines..spaces created with "Tab" key won't go away...
    – Ĭsααc tիε βöss
    Jun 2 '14 at 18:38






  • 3




    @ISAAC Using this search pattern will catch tab characters as well: ( |t)+
    – iglvzx
    Jun 2 '14 at 18:49


















up vote
0
down vote













Before replacing ' +' with ':' go to Edit->blank operations->ΤΑΒ to space. Then it should work as expected.






share|improve this answer























  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. You can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.
    – fixer1234
    Nov 20 at 11:16











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f762723%2freplace-spaces-with-colon-in-notepad%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
5
down vote













Replace + ( followed by +) with ::



enter image description here



Make sure Regular expression is checked.



As igalvez pointed out in his comment, you might want to use ( |t)+ to also match t (the tab character).



One might want to use s to match all whitespace, but that will also match the line breaks and condense your whole data to a single line.






share|improve this answer



















  • 1




    Not Working
    – Farid
    Jun 2 '14 at 16:58






  • 1




    @OliverSalzburg nope
    – Farid
    Jun 2 '14 at 17:04






  • 1




    @Farid I'm shub ;) Add the space and it should work :)
    – ᔕᖺᘎᕊ
    Jun 2 '14 at 17:04






  • 1




    I made space using "spacebar" for two lines..and made space using "Tab" for other two lines....this didn't work with Tab spaced lines..spaces created with "Tab" key won't go away...
    – Ĭsααc tիε βöss
    Jun 2 '14 at 18:38






  • 3




    @ISAAC Using this search pattern will catch tab characters as well: ( |t)+
    – iglvzx
    Jun 2 '14 at 18:49















up vote
5
down vote













Replace + ( followed by +) with ::



enter image description here



Make sure Regular expression is checked.



As igalvez pointed out in his comment, you might want to use ( |t)+ to also match t (the tab character).



One might want to use s to match all whitespace, but that will also match the line breaks and condense your whole data to a single line.






share|improve this answer



















  • 1




    Not Working
    – Farid
    Jun 2 '14 at 16:58






  • 1




    @OliverSalzburg nope
    – Farid
    Jun 2 '14 at 17:04






  • 1




    @Farid I'm shub ;) Add the space and it should work :)
    – ᔕᖺᘎᕊ
    Jun 2 '14 at 17:04






  • 1




    I made space using "spacebar" for two lines..and made space using "Tab" for other two lines....this didn't work with Tab spaced lines..spaces created with "Tab" key won't go away...
    – Ĭsααc tիε βöss
    Jun 2 '14 at 18:38






  • 3




    @ISAAC Using this search pattern will catch tab characters as well: ( |t)+
    – iglvzx
    Jun 2 '14 at 18:49













up vote
5
down vote










up vote
5
down vote









Replace + ( followed by +) with ::



enter image description here



Make sure Regular expression is checked.



As igalvez pointed out in his comment, you might want to use ( |t)+ to also match t (the tab character).



One might want to use s to match all whitespace, but that will also match the line breaks and condense your whole data to a single line.






share|improve this answer














Replace + ( followed by +) with ::



enter image description here



Make sure Regular expression is checked.



As igalvez pointed out in his comment, you might want to use ( |t)+ to also match t (the tab character).



One might want to use s to match all whitespace, but that will also match the line breaks and condense your whole data to a single line.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 20 '17 at 10:17









Community

1




1










answered Jun 2 '14 at 16:50









Der Hochstapler

66.9k48230283




66.9k48230283








  • 1




    Not Working
    – Farid
    Jun 2 '14 at 16:58






  • 1




    @OliverSalzburg nope
    – Farid
    Jun 2 '14 at 17:04






  • 1




    @Farid I'm shub ;) Add the space and it should work :)
    – ᔕᖺᘎᕊ
    Jun 2 '14 at 17:04






  • 1




    I made space using "spacebar" for two lines..and made space using "Tab" for other two lines....this didn't work with Tab spaced lines..spaces created with "Tab" key won't go away...
    – Ĭsααc tիε βöss
    Jun 2 '14 at 18:38






  • 3




    @ISAAC Using this search pattern will catch tab characters as well: ( |t)+
    – iglvzx
    Jun 2 '14 at 18:49














  • 1




    Not Working
    – Farid
    Jun 2 '14 at 16:58






  • 1




    @OliverSalzburg nope
    – Farid
    Jun 2 '14 at 17:04






  • 1




    @Farid I'm shub ;) Add the space and it should work :)
    – ᔕᖺᘎᕊ
    Jun 2 '14 at 17:04






  • 1




    I made space using "spacebar" for two lines..and made space using "Tab" for other two lines....this didn't work with Tab spaced lines..spaces created with "Tab" key won't go away...
    – Ĭsααc tիε βöss
    Jun 2 '14 at 18:38






  • 3




    @ISAAC Using this search pattern will catch tab characters as well: ( |t)+
    – iglvzx
    Jun 2 '14 at 18:49








1




1




Not Working
– Farid
Jun 2 '14 at 16:58




Not Working
– Farid
Jun 2 '14 at 16:58




1




1




@OliverSalzburg nope
– Farid
Jun 2 '14 at 17:04




@OliverSalzburg nope
– Farid
Jun 2 '14 at 17:04




1




1




@Farid I'm shub ;) Add the space and it should work :)
– ᔕᖺᘎᕊ
Jun 2 '14 at 17:04




@Farid I'm shub ;) Add the space and it should work :)
– ᔕᖺᘎᕊ
Jun 2 '14 at 17:04




1




1




I made space using "spacebar" for two lines..and made space using "Tab" for other two lines....this didn't work with Tab spaced lines..spaces created with "Tab" key won't go away...
– Ĭsααc tիε βöss
Jun 2 '14 at 18:38




I made space using "spacebar" for two lines..and made space using "Tab" for other two lines....this didn't work with Tab spaced lines..spaces created with "Tab" key won't go away...
– Ĭsααc tիε βöss
Jun 2 '14 at 18:38




3




3




@ISAAC Using this search pattern will catch tab characters as well: ( |t)+
– iglvzx
Jun 2 '14 at 18:49




@ISAAC Using this search pattern will catch tab characters as well: ( |t)+
– iglvzx
Jun 2 '14 at 18:49












up vote
0
down vote













Before replacing ' +' with ':' go to Edit->blank operations->ΤΑΒ to space. Then it should work as expected.






share|improve this answer























  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. You can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.
    – fixer1234
    Nov 20 at 11:16















up vote
0
down vote













Before replacing ' +' with ':' go to Edit->blank operations->ΤΑΒ to space. Then it should work as expected.






share|improve this answer























  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. You can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.
    – fixer1234
    Nov 20 at 11:16













up vote
0
down vote










up vote
0
down vote









Before replacing ' +' with ':' go to Edit->blank operations->ΤΑΒ to space. Then it should work as expected.






share|improve this answer














Before replacing ' +' with ':' go to Edit->blank operations->ΤΑΒ to space. Then it should work as expected.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 20 at 18:28

























answered Nov 20 at 10:54









T.T.

11




11












  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. You can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.
    – fixer1234
    Nov 20 at 11:16


















  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. You can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.
    – fixer1234
    Nov 20 at 11:16
















This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. You can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.
– fixer1234
Nov 20 at 11:16




This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. You can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.
– fixer1234
Nov 20 at 11:16


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f762723%2freplace-spaces-with-colon-in-notepad%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

AnyDesk - Fatal Program Failure

How to calibrate 16:9 built-in touch-screen to a 4:3 resolution?

QoS: MAC-Priority for clients behind a repeater