Split field data at space into two fields

Comments

3 comments

  • Tyler Lamparter Principal Product Manager
    Awesome Follow-up
    Engaged
    Top Contributor
    Answer Pro
    Celigo University Level 4: Legendary

    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
  • Beverly Bishop

    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
  • Tyler Lamparter Principal Product Manager
    Awesome Follow-up
    Engaged
    Top Contributor
    Answer Pro
    Celigo University Level 4: Legendary

    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.