# Remove string after certain character

**URL:** <https://community.make.com/t/remove-string-after-certain-character/43725>\
**Category:** Questions\
**Created:** [June 27, 2024, 10:48pm UTC](https://community.make.com/t/remove-string-after-certain-character/43725 "2024-06-27T22:48:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hb](https://avatars.discourse-cdn.com/v4/letter/h/c68b51/32.png) [@hb](https://community.make.com/u/hb)\
**Post date:** [June 27, 2024, 10:48pm UTC](https://community.make.com/t/remove-string-after-certain-character/43725/1 "2024-06-27T22:48:21Z")

</div>

Hello I would like to know the formula i can use in the set a variable module to remove characters after a certain character

e.g. character to remove is /  
input: **[google.com/1234abcd](http://google.com/1234abcd)** output: **[google.com](http://google.com)**

Please can someone help me with this?

---

<div class="post-metadata">

**Author:** ![Donald\_Mitchell](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/donald_mitchell/32/8749_2.png) [@Donald\_Mitchell](https://community.make.com/u/Donald_Mitchell)\
**Post date:** [June 27, 2024, 11:34pm UTC](https://community.make.com/t/remove-string-after-certain-character/43725/2 "2024-06-27T23:34:21Z")

</div>

Hello,

You could probably use the split() and first() functions, like this:  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/a/2a9535def70caacbbbd6faef97803914eb59fa8d.png)

---

<div class="post-metadata">

**Author:** ![Msquare\_Automation](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/msquare_automation/32/6634_2.png) [@Msquare\_Automation](https://community.make.com/u/Msquare_Automation)\
**Post date:** [June 28, 2024, 5:34am UTC](https://community.make.com/t/remove-string-after-certain-character/43725/3 "2024-06-28T05:34:31Z")

</div>

Hi @hb

The option provided by @Donald_Mitchell looks great. You can also cut string based on count of characters using below formula:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/8/f/8f0a06ba14a0eff1ca8253909a63a33304639761.png)

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/d/1/d1289e0cb33a54911f9be8cea4d95c88fbc576fe.png)

Regards,  
**Msquare Automation - Gold Partner of Make**

> [Free Consultation](https://calendly.com/msquarepro/meeting) | [Live Implementation](https://calendly.com/msquarepro/msquareautomation-live)

> Visit us [here](https://www.msquare.pro/) | [Youtube Channel](https://www.youtube.com/channel/UCqidlIIwbejxZmRUWBICcjQ)

---

<div class="post-metadata">

**Author:** ![hb](https://avatars.discourse-cdn.com/v4/letter/h/c68b51/32.png) [@hb](https://community.make.com/u/hb)\
**Post date:** [June 28, 2024, 5:51am UTC](https://community.make.com/t/remove-string-after-certain-character/43725/4 "2024-06-28T05:51:41Z")

</div>

Thank you both, it will could be a different url to [google.com](http://google.com) so the first formula where I don’t specify the string length is perfect for my use case!

---

<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:** [July 12, 2024, 6:04am UTC](https://community.make.com/t/remove-string-after-certain-character/43725/5 "2024-07-12T06:04:06Z")

</div>


