Can i split text using space delimiter?

i try to find something to split text with delimiter “space delimiter” but i think i failed.
the one i found is splitting based on count, similar to trim with left or right function at google sheet.

Please How to split Full Name “first and second” to obtain the first name only?

Thank you

A Split Text column should work to split the name into an array. Then use a Single Value column to get the first item from the array.

2 Likes

this is a new approach for me :bouquet:, i will try to implement it.

1 Like

A Example : How to extract components from split text column

And also I believe that you can do this with Regex! I saw a post by Darren but It’s old and can’t find it! I think this is the code : (\w+) Maybe Darren ( @Darren_Murphy ) can confirm ?

image

With the Extract Matching Text column :

Thank you

1 Like

Thank you for your support. let’s wait for @Darren_Murphy kind confirmation.

it works fine for English letters, but it doesn’t work with Arabic names,

Hello @Jeff_Hager , i am not able to find a column named Split Text. please advise.

1 Like

Does this works? I guess it should!

(.+)\s((?!\.))

1 Like

I will try

Yup, it works, but it looks strange code for me at least :pray: :bouquet:

2 Likes

Ben Collins - the legend of the Google Sheets world, had a regular expression “day” in his 30-day course.

I would suggest you taking this course. It was life-changing for me.

If that is not for you then probably this snippet of JavaScript will be easier to read, if you just need to take back the first name.

Basically splitting the full name by the space character and taking the first item in the array (index 0).

9 Likes

Hola, this code looks readable for me at least :grinning:. I will see this course of course. If it is life changing for person like you then it would be for me. Thanking you for spreading and sharing your knowledge.

1 Like

A bit for me too! :sweat_smile: But getting there as far as I can! I’m new to this Regex World! Like to go deeper because I see some interesting things that can do!

Didn’t added to my post that I found this code from this post! :

Good Luck!

And Thanks Thinh for that Useful Information!

2 Likes

Thank you so much for taking from your valuable time to reply to me. :bouquet:

1 Like