Does there exist something like a 'new line&apo

Does there exist something like a ‘new line’ character in IS46 that can be used when handling string variables?
When generating a string from a stringlist (pub.string.makestring) I would like to separate the stringlist elements by a ‘new line’. How do you define the ‘new line’ separator?

Anyone done this before?


If you want a newline do this.

Go to the variable that you want to set to include the ‘newline’ value. Right click on its edit box and choose “use larger editor”.

Then you can put in newlines to your hearts content.

My question is pretty much the same, in particular, I’m using the pub.string:tokenize service to delimit a text file, if you leave the ‘delimiter’ input variable as blank, it will delimit all spaces, new lines, and carriage returns, but how do you make it just delimit new lines? I’ve copied and pasted a ‘new line’ character, which appears as a square box (or sometimes two), but this just seems “ghetto”. Any suggestions?

The text file contains spaces and new lines, and all I want are new lines to be delimited.

Look forward to hearing from someone.


Here are 2 choices:

  1. In the Flow operation that calls “pub.string:tokenize” and sets the “delim” input field, when you see the text field for entering the “delim” value, right-click in the field and you’ll get a pop-up menu. Choose “Use Larger Editor” and you’ll be able to type in a newline character.

  2. You could write a one line Java service:
    IDataUtil.put( pipeline.getCursor(), “delim”, “\n” );

I tried both of these in Windows and they work, but you should be able to use the same techniques for other platforms.

hex ‘0a’ (zero a) is the linefeed character. Unix and Windows ‘understand’ it and it is represented as a square box in the developer.

You can for example with pub.string:replace substitute one delimiter with the hex value. For the replace string write ‘\x0a’ (without the hyphens). Make sure to check: use reg. Expressions. Otherwise webMethods doesn’t recognise the \x properly.

This worked great! Thanks. I actually ended up using the RE <\n|\r> (‘n’ for new line, ‘|’ for “or”, and ‘r’ for carriage return. Seems like carriage returns and new lines were stacking up on each other even though it only appeared like one was actually in there.

Once again … thanks!

In my case I have an ASCII string with several | characters in it which I wish to replace with a Line Feed character

String:replace doesn’t work as it only does the regular expressions on the search string

Any one any ideas on how to insert a LF in a string, without resorting to java

Dont worry, I’ve sorted it, trying to be too clever putting “\x0a” etc in, when I could have just hit the enter key!!!