Use AttributeSplitter with a Carriage Return
I am trying to split text features that contain a carriage return into two separate pieces of text so I can better control the spacing between the text lines. I can use a StringSearcher to find the text using the \\r variable. However, when I try to the use the \\r in the AtrributeSplitter, it will not split it into two separate list elements. I am using FME2012.
Hi,
In FME 2013, we can select special characters including carriage return on Advanced Text Editor when setting the parameter of AttributSplitter. I forgot whether there was such an editor in FME 2012... Alternatively, how about trying a combination of StringReplacer and AttributeSplitter? Replace \\r with \\n by StringReplacer (Use Regular Expression = yes), then split the text at \\n by AttributeSplitter. Hope this helps.
+3
In FME2012, \\n is the newline character within the AttributeSplitter.
The reference is as follows:
http://fmepedia.safe.com/articles/Samples_and_Demos/AttributeSplitter
If such doesn't work, also refer to:
http://fmepedia.safe.com/AnswersQuestionDetail?id=906a0000000cb1hAAA
The newline character(s) may vary depending on the input data format and operating system. Unfortunately, it can be rather complicated sometimes, see http://en.wikipedia.org/wiki/Newline for a more complete discussion.
In FME 2012, the following may work in some cases:
- Open the AttributeSplitter parameters
- For "Delimiter or Format String", click the button and select "Open Editor..."
- In the editor window, press the Enter key once (and nothing else) to insert a single newline
- Click Ok twice
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.