I need a regular express for notepad++ to remove new line and empty spaces

时间:2015-04-23 05:43:13

标签: php mysql regex replace notepad++

here is a sample text:

a:7:{
        i:0;
        i:9;
    }

I want all the new lines and empty spaces to be removed so it would look like this:

a:7:{i:0;i:9;}

So I'm using notepad++ for editing and im wondering how to the above with the find and replace feature.

1 个答案:

答案 0 :(得分:0)

按Ctrl + H打开替换窗口。

在搜索模式中选择正则表达式并选中"匹配换行符"复选框。

在"找到什么"输入 - \ s

保留"替换为"字段空

选择"环绕"复选框并点击"全部替换"

编辑:添加屏幕截图以供参考:

enter image description here