Remove blank spaces

Tool for Search and Replace across multiple files.
philrob
Posts: 2
Joined: Sun Apr 07, 2013 7:32 pm

Remove blank spaces

Post by philrob »

I have lists of text as below

{
VisGroups=(36)
MeshFile=spot26.gmt CollTarget=False HATTarget=False
}
HOW DO I REMOVE THESE SPACES
Instance=spot27
{
VisGroups=(36)
MeshFile=spot27.gmt CollTarget=False HATTarget=False
}
HOW DO I REMOVE THESE SPACES AND CLOSE UP THE TEXT
Instance=spot28
{
VisGroups=(36)
MeshFile=spot28.gmt CollTarget=False HATTarget=False
}
HOW DO I REMOVE THESE SPACES
Instance=spot29
{
VisGroups=(36)
MeshFile=spot29.gmt CollTarget=False HATTarget=False
}
Instance=spot30
{
VisGroups=(36)
MeshFile=spot30.gmt CollTarget=False HATTarget=False
}
how could i remove the spaces between the lines and close up the text above and below?
regards
phil
User avatar
DigitalVolcano
Site Admin
Posts: 1863
Joined: Thu Jun 09, 2011 10:04 am

Re: Remove blank spaces

Post by DigitalVolcano »

To remove blank lines:

-Regular Expression Tab,
-Multi line anchors option enabled

Find: ^\r\n
Replace: (nothing)

That should do it.

Test in the regex tester first if not sure.
philrob
Posts: 2
Joined: Sun Apr 07, 2013 7:32 pm

Re: Remove blank spaces

Post by philrob »

DV

many thanks that worked perfectly

regards
phil
Post Reply