Hi. Does anyone knows how to to incorporate a line feeder filter, for Char(13) using the developer?
Jennifer
try this link [url=“wmusers.com”]wmusers.com and read Rob’s response.
HTH
You can use sed and awk commands inside the string replace utility. I just can’t remember the lookup for carriage return. I remember line feed just fine \n.
So if you can find the control character for Carriage return then you could use something like this in the expression area of the search routine function: s/\n//g of course you would need to find replace the \n with the carriage return sequence.
Its either this or write something in a java routine… This will work just fine… Dam i just can’t remember the carriage return character sequence if i remember I will post.
Sed and awk method is far easier and just as fast…
the principle to remember is s/ indicates replace…
the \n represents anything you are looking for… ( keep in mind \n is the C rep for newline ) Also periods and wild cards have special meaning in order to search for complex phrases…
the next // indicates what you would like to replace the occurance with. In your case nothing // if you wanted to replace it with x then it would be /x/
and the g at the end indicates global or the routine should apply to the whole document not just a particular line or lines.
Once you get use to sed/awk you can save a ton of time avoiding java’s not so nice string manipulation functions when compared to other languages such as VB or php.
webMethods didn’t incorporate regular expressions including ( Sed and Awk ) for nothing… They are very very powerfull and to ignore using them adds more java complexity and actually will slow you down…
Ah found it if you want to eliminate carriage returns i believe the code is \r as mentioned above…
In the search string Integrator function use expressions and here is your filter…
s/\r//g
that is it… your output would contain a string with the return character gone… One line that is all… For those who don’t know SED and AWK rule and I’m glad webMethods agreed.
Insert your String search part into the flow…
Sete use Reg Expresssions to true
in the search put \r
in the replace set it to empty
it works I"ve tested it… and its fast