regex - Replace spaces with colon (:) in Notepad++?
2014-07
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++?
Replace +
( followed by
+
) with :
:
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.
I know its simple, but I can't get it to work...
I have a strings like
{span style="display:none"}123{/span} and
{span style="display:none"}456{/span} and
{span style="display:none"}789{/span}
in a file.
I want to remove all of these string.
So, I thought a simple regular expression replace in NotePad++ should be like
{span style="display:none"}[(.)]{/span}
but, this is not working.
Thank for your help!
You were close
{span style="display:none"}(.*){/span}
Found it!
Now using {span style="display:none"}[0-9a-zA-Z_&-. ]+{/span} in the search box!