Split field data at space into two fields

NetSuite transaction Listener to FTP XML file.

I need to separate the house number <nr> from the street <street> in the Address1 field.  Essentially, everything left of the first space creates one field and everything right of the first space creates another field.

Is this possible?

0

Comments

3 comments
Date Votes
  • Beverly Bishop here you go!

    //option to get everything after first space
    {{regexMatch street "(?<=\s).*" 0}}

    //two options to get characters before first space
    {{regexMatch street "([^\s]+)" 0}}
    {{split street " " 0}}

     

    I'm also curious to see what Steve Klett comes up with.

    0
  • Thanks, Tyler Lamparter! I'm probably doing something wrong here. I get the same error for both regexMatch options and the split returns blank.

    0
  • Beverly Bishop in my sample, street is my field name. You would need to modify that for your data. In this case it would be data.0.street.

    //option to get everything after first space
    {{regexMatch data.0.street "(?<=\s).*" 0}}

    //two options to get characters before first space
    {{regexMatch data.0.street "([^\s]+)" 0}}
    {{split data.0.street " " 0}}
    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post