|
Rank: Member
Joined: 1/28/2015 Posts: 24 Location: Sweden
|
Hello, fellow map forces!
I'm currently struggling with a really simple thing I want to execute on a mapping.
I have a .json file that is mapped into a regular .xml One string in the .json file have a text with a line break code "\n". That code is translated to the .xml as a "
"
I want to separate the text where this code is present and have tried to do so with the "substring before" The problem is that may force does not seem to find the code. I have tried: "\n", "
", and char-from-code with both in ASCII. I have tried connecting the substring-before with a tokenize-regexp. With no avail...
the string looks like this: .json: text text text\ntext text text .xml: text text text
text text
Any ideas what's happening?
|
|
Rank: Advanced Member
Joined: 6/16/2006 Posts: 486 Location: AT
|
substring-before with char-from-code(10) works fine in my quick test to extract the first line.
|
|
Rank: Member
Joined: 1/28/2015 Posts: 24 Location: Sweden
|
that wrote:substring-before with char-from-code(10) works fine in my quick test to extract the first line.
Thanks for trying it out. It did not work here tho. It will separate the string when it fins the number "4"
Example:
original string: "the time is now 22:49 sir" string with your setup "the time is now 22:"
The code-from-char translates input "10" to value "49"
Am i missing something?
|
|
Rank: Advanced Member
Joined: 6/16/2006 Posts: 486 Location: AT
|
Don't confuse char-from-code and code-from-char.
|
|
Rank: Member
Joined: 1/28/2015 Posts: 24 Location: Sweden
|
that wrote:Don't confuse char-from-code and code-from-char.
How sloppy of me! Thanks got it working now.
|
|
guest |