Replace all number to a new line
-
Hello… please help me friend.
i have this data bellow :
Microsoft Lync14.4.3
Wunderlist3.4.25
Artbox for Affinity1.1
GlowPuzzle2.0
Speech1.8.2
Paste Queue (Multi Clipboard)1.3
MPS2018.2
Yandex.Disk3.0.3and i need to separate all the word and number like this :
Peep
2.3.4
Microsoft Lync
14.4.3
Wunderlist
3.4.25
Artbox for Affinity
1.1
GlowPuzzle
2.0
Speech
1.8.2
Paste Queue (Multi Clipboard)
1.3
MPS
2018.2
Yandex.Disk
3.0.3please help me for do this… thanks
-
Hello, @app-guide and All,
Easy with regexes !
-
Open the Replace dialog (
Ctrl + H
)-
Type in
[\d.]+$
in the Find what: zone -
Type in
\r\n$0
in the Replace with: zone OR\n$0
if you works on an Unix file -
Tick the
Wrap around
option -
Select the
Regular expression
search mode -
Click on the
Replace All
button
-
Voila :-))
Notes :
-
The
[\d.]
regex syntax searches for a single character which can be, either, a digit (\d
) or a dot (.
) -
Then, the
[\d.]+
looks for a non-null range of characters, which can be, either, a digit or a dot -
And the
[\d.]+$
tries to match the greatest non-null range of digits / dots till the end ($
) of current line -
In replacement, we first write the line-break characters (
\r\n
or\n
), followed with the overall search match ($0
)
Best regards,
guy038
-