Start a new topic
Answered

How to remove empty lines from a source file?

Hello,


Is it possible to remove empty lines from a source file Metadata ?


Best Answer

Hello,


You can delete these empty lines in reading by using "Transformation Scripting" and a filter on the metadata.

First in the properties of the metadata you can apply the following Rhino script which replaces all empty lines with the value "empty":

Script :


ret=new Array();
if (__string__==""){
ret[0]="empty";
}
else {
ret[0] = __string__;
}
ret;


Then you would have to add a new filter in the metadata:


which will return only rows that don't have the string "empty" at the beginning of the row

1 Comment

Answer

Hello,


You can delete these empty lines in reading by using "Transformation Scripting" and a filter on the metadata.

First in the properties of the metadata you can apply the following Rhino script which replaces all empty lines with the value "empty":

Script :


ret=new Array();
if (__string__==""){
ret[0]="empty";
}
else {
ret[0] = __string__;
}
ret;


Then you would have to add a new filter in the metadata:


which will return only rows that don't have the string "empty" at the beginning of the row

Login to post a comment