# \[Issue\] Removing spaces from text body

**URL:** <https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843>\
**Category:** Need help\
**Created:** [August 1, 2016, 3:09am UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843 "2016-08-01T03:09:26Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![scriptschool](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@scriptschool](https://forum.bubble.io/u/scriptschool)\
**Post date:** [August 1, 2016, 3:09am UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/1 "2016-08-01T03:09:26Z")

</div>

Hi there,

I am looking for a way to remove all spaces from texts. Not looking to remove spaces from the start/end of a string, but looking to remove all spaces from the string.

Anyone know how to do this natively within Bubble?

I did see a forum suggestion elsewhere that Blockspring might be able to do it, but looking for an internal/Bubble solution first. @emmanuel , do you think this is a function you guys could add?

Thanks,  
P

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [August 1, 2016, 1:37pm UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/2 "2016-08-01T13:37:56Z")

</div>

What is the use case here? That sounds very specific, not sure we want to add an option for this as it’s very rare and Blockspring does the job (and soon the plugin system).

---

<div class="post-metadata">

**Author:** ![raymond](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@raymond](https://forum.bubble.io/u/raymond)\
**Post date:** [August 1, 2016, 2:30pm UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/3 "2016-08-01T14:30:05Z")

</div>

I would use it for users’s @HandleName

---

<div class="post-metadata">

**Author:** ![scriptschool](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@scriptschool](https://forum.bubble.io/u/scriptschool)\
**Post date:** [August 1, 2016, 9:26pm UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/4 "2016-08-01T21:26:51Z")

</div>

The use case is to compare text strings without having spaces throwing off match/no match determinations.

Thanks,  
P

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [August 1, 2016, 11:16pm UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/5 "2016-08-01T23:16:09Z")

</div>

We’re pushing a more generic function that will let you do a find and replace in a text. The way it works is consistent with other operations on text. In the dropdowns pick ‘:find/replace’ and you’ll be able to define the find and replace fields (can even be dynamic, which opens up quite some possibilities).

If your case you’d say: find: ’ ’ replace ‘’

---

<div class="post-metadata">

**Author:** ![scriptschool](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@scriptschool](https://forum.bubble.io/u/scriptschool)\
**Post date:** [August 1, 2016, 11:31pm UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/6 "2016-08-01T23:31:20Z")

</div>

Awesome - that’s extremely useful and will help with several other data tasks.

Thanks so much!

P

---

<div class="post-metadata">

**Author:** ![scriptschool](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@scriptschool](https://forum.bubble.io/u/scriptschool)\
**Post date:** [August 1, 2016, 11:46pm UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/7 "2016-08-01T23:46:04Z")

</div>

Just thought of something - can you guys enable ‘wildcards’ as part of the find/replace.

This would be HUGELY useful…

Thanks,  
P

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [August 2, 2016, 12:07am UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/8 "2016-08-02T00:07:04Z")

</div>

What do you mean exactly?

---

<div class="post-metadata">

**Author:** ![scriptschool](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@scriptschool](https://forum.bubble.io/u/scriptschool)\
**Post date:** [August 2, 2016, 1:17am UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/9 "2016-08-02T01:17:41Z")

</div>

I mean allow text in between two words to be caught by a ‘\*’ (or some other wildcard).

If I wanted to find and replace this paragraph, I would have to know what was in it and then insert the entire paragraph into the find/replace. But if you enabled wildcards I could simply do it by finding/replacing the following:

If \* following:

This solves many many many problems with text.

Thanks,  
P

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [August 2, 2016, 10:44pm UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/10 "2016-08-02T22:44:39Z")

</div>

So I made it so that you can use Regex (or a simple text) to find. That’s a bit more technical, but that means you can do something like this.

> **[Bubble Editor - Forumapp3](https://bubble.io/page?type=page&name=find_replace&id=forumapp3&tab=tabs-1)**
>
> Build stuff without code and launch a startup without a tech-cofounder! Bubble is a visual programing language. Instead of typing code, use a visual editor to build applications.

---

<div class="post-metadata">

**Author:** ![scriptschool](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@scriptschool](https://forum.bubble.io/u/scriptschool)\
**Post date:** [August 2, 2016, 11:50pm UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/11 "2016-08-02T23:50:43Z")

</div>

Fantastic. Thanks!!!

P

---

<div class="post-metadata">

**Author:** ![scriptschool](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@scriptschool](https://forum.bubble.io/u/scriptschool)\
**Post date:** [August 3, 2016, 12:18am UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/12 "2016-08-03T00:18:10Z")

</div>

Hi, just testing out the feature.

Think you guys could enable the ‘line\_break’ function? Would be great to replace commas, semi-colons etc. with line breaks. I don’t think this is enabled?

Thank you!

P

---

<div class="post-metadata">

**Author:** ![emmanuel](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/emmanuel/32/27657_2.png) [@emmanuel](https://forum.bubble.io/u/emmanuel)\
**Post date:** [August 3, 2016, 2:57pm UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/13 "2016-08-03T14:57:39Z")

</div>

We’ll push this later today.

---

<div class="post-metadata">

**Author:** ![scriptschool](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@scriptschool](https://forum.bubble.io/u/scriptschool)\
**Post date:** [August 3, 2016, 11:11pm UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/14 "2016-08-03T23:11:39Z")

</div>

Great - Thanks!

P

---

<div class="post-metadata">

**Author:** ![Pat](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Pat](https://forum.bubble.io/u/Pat)\
**Post date:** [August 11, 2016, 3:14pm UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/15 "2016-08-11T15:14:28Z")

</div>

hello,

can somebody maybe explain how I would use regex with find & replace?

I have this regex:

~(?:\b)((?=[0-9a-z]\*\d)[0-9a-z]{10})(?:\b)~i

and I want to extract the ASIN from an amazon URL like this for example:

`> https://www.amazon.com/Sigmasport-computer-frequency-Computer-monitors/dp/B0060RLN8A/ref=pd_rhf_gw_p_img_6?ie=UTF8&psc=1&refRID=RWFE82CN033Z93SX96C3`

I have the regex from:

> <https://stackoverflow.com/questions/1764605/scrape-asin-from-amazon-url-using-javascript>

---

<div class="post-metadata">

**Author:** ![scriptschool](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@scriptschool](https://forum.bubble.io/u/scriptschool)\
**Post date:** [August 23, 2016, 7:38pm UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/16 "2016-08-23T19:38:13Z")

</div>

Hi -

For each RG cell, I have an object (shape) visible/invisible based on this conditional: _compare the cell’s text to an API’s text string in the same cell_.

The Find&replace option is only enabled for 1 text, and I need both of them, which Bubble doesn’t enable.

Example A:  
_When Current cell’s text… **Find&Replace** is not API.idx.text_

works just fine,

but:

_When Current cell’s text… **Find&Replace** is not API.idx.text works… **FIND&REPLACE** _

does not (there is no option to enable this 2nd find&replace).

Note that the issue is not about the API.text vs the cell text. For example, I can reverse the argument fine:

_When API.idx.text… **Find&Replace** is not Current cell’s text_

works just fine,

but

_When API.idx.text… **Find&Replace** is not Current cell’s text… **FIND&REPLACE** _

does not (there is no option to enable this 2nd find&replace).

Do you think we could enable this? Alternatively, is there another solution?

Thanks,  
P

---

<div class="post-metadata">

**Author:** ![villasenorindustries](https://avatars.discourse-cdn.com/v4/letter/v/b5ac83/32.png) [@villasenorindustries](https://forum.bubble.io/u/villasenorindustries)\
**Post date:** [January 7, 2017, 12:09pm UTC](https://forum.bubble.io/t/issue-removing-spaces-from-text-body/4843/17 "2017-01-07T12:09:01Z")

</div>

How did you do that? When I tried to create multiple input find and replace the other ones did not work. For example: A contract with find and replace fields mapped out in which i can just quickly fill out inputs replace the fields needed quickly and in realtime on the page?
