# Split() by a space

**URL:** <https://community.make.com/t/split-by-a-space/71061>\
**Category:** Questions\
**Tags:** arrays\
**Created:** [February 23, 2025, 2:45am UTC](https://community.make.com/t/split-by-a-space/71061 "2025-02-23T02:45:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Wang](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@David\_Wang](https://community.make.com/u/David_Wang)\
**Post date:** [February 23, 2025, 2:45am UTC](https://community.make.com/t/split-by-a-space/71061/1 "2025-02-23T02:45:27Z")

</div>

Hi everyone,

I have a text for full name which needs to be split into first name and last name.  
​​​​​​  
Last (split(“John, Smith”;,)) would return “Smith”

but ​​​​​​  
Last (split(“John Smith”; " ")) or ​​​​​​Last (split(“John, Smith”; )) does not return “Smith” \*note separator is a space here.

Any suggestions? The separator in our source database is actual a space. Or any other way to resolve this?

Thanks,  
David

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [February 23, 2025, 3:37am UTC](https://community.make.com/t/split-by-a-space/71061/2 "2025-02-23T03:37:21Z")

</div>

Welcome to the Make community!

You can use the built-in function `split`. You need to include both the comma and the space in the delimiter parameter.

e.g.:

```plaintext
{{ first(split("John, Smith"; ", ")) }}
{{ last(split("John, Smith"; ", ")) }}

```

 ![Screenshot_2025-02-23_110256](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/8/d/8d0d805070e281fd0cea9d6cbcc2ba127c045fad.png)

**Output:**

![Screenshot_2025-02-23_110201](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/a/2a548e2d1bbb7a921c0e3465ec1dfc3048fe3a98.png)

For more information, see the function documentation in the [Help Center](https://www.make.com/en/help) and do the [tutorials in the Make Academy](https://academy.make.com).

Hope this helps! Let me know if there are any further questions or issues.

— @samliew

P.S.: Investing some effort into the [Make Academy](https://academy.make.com) will save you lots of time and frustration using Make.

---

<div class="post-metadata">

**Author:** ![David\_Wang](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@David\_Wang](https://community.make.com/u/David_Wang)\
**Post date:** [February 23, 2025, 4:23am UTC](https://community.make.com/t/split-by-a-space/71061/3 "2025-02-23T04:23:00Z")

</div>

Thanks heaps. However, my data source is “John Smith” which does not include comma. How to split this this data source?

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [February 23, 2025, 11:55am UTC](https://community.make.com/t/split-by-a-space/71061/4 "2025-02-23T11:55:32Z")

</div>

Welcome to the Make community!

You can use the built-in function `split`. You need to use a space in the delimiter parameter, or use the special variable `space`.

e.g.:

```plaintext
{{ first(split("John, Smith"; " ")) }}
{{ last(split("John, Smith"; " ")) }}

```

or,

```plaintext
{{ first(split("John, Smith"; space)) }}
{{ last(split("John, Smith"; space)) }}

```

(select space from the variables panel, not type it in)

For more information, see the function documentation in the [Help Center](https://www.make.com/en/help) and do the [tutorials in the Make Academy](https://academy.make.com).

Hope this helps! Let me know if there are any further questions or issues.

— @samliew

P.S.: Investing some effort into the [Make Academy](https://academy.make.com) will save you lots of time and frustration using Make.

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [May 24, 2025, 10:57am UTC](https://community.make.com/t/split-by-a-space/71061/5 "2025-05-24T10:57:37Z")

</div>


