Sometimes when I copy text with line break (I believe that’s where it happened), a tab space (or whatever it is called) is added.
The issue I have with it that I can’t filter it out and it causes me issue with Substitution formulas. For example, I have text below and my substitution formula should substitute the string of text " is " with just blank “”.
It looks like this:
Now I know there is regex and stuff, but assume I am using Substitution formulas because that is what I have already build in my field formula. So I am just using:
SUBSTITUTE(field_name," is “,”")
The issue is this formula doesn’t work if the space around “is” is not normal space but that tab space.
And I can’t figure out the way to remove that tab space.
Often I don’t realize there is space in text and I would break my head why the subsequent formulas do not work.
So I am wondering if anybody found a solution.
Here this was mentioned but i think the solution was to remove the spaces in text editor.
What I am looking for is to prevent this from being an issue.
In your screen shot, you show several optional characters after the word “is”. However, in your text, you only talk about white space around the word “is” and not other characters.
It also isn’t clear what the words before and after “is” could be, which could affect how the formula would be written.
If you need to deal with several optional characters, I suggest reconsidering using REGEX.
If you want to stick with SUBSTITUTE, you can use multiple nested SUBSTITUTE() formulas. Use one to replace tabs with spaces. Use another one or two to consolidate multiple spaces to a single space. Then have your original SUBSTITUTE() on the outside.
Thank you yes it’s weird.
The characters before “is” is just single space.
The characters after “is” could be single space (as between words I am writing now) or it could be the weird space that sometimes looks like a single space, sometimes like double space, sometimes like triple or quadruple space. It is actually one character I think, because it takes me just one time hitting BACKSPACE on the keyboard to delete it. It is spongy, so let’s say when I overwrite the word “this” with “thhhis” then the space after “is” shrinks to a single space and the word space stays where it is. If I expand the word this even more, the word space is moved to right and the spongy space becomes again quadruple space.
The issue I don’t know what that special character is.
I assume it is normal tab space.
But I am not able to remove the tab space using Airtable substitute formula.
Tried telling it to remove single space " " and 2x hitting key single space " " and 3x hitting key single space " " using Substitute formula, but it is not able to remove that tab space at all.
The only reason I wanted to stick with Substitute formula is because due to lack of skill with Regex and due to existence of GPT at that time, I ended up using the a Substitute formula, so I thought I would use add substitution for consistency reasons.
But if there is no other way I will try Regex, but I still don’t know what to put there either to remove that flexible tab space.
Maybe this will work, I will try it once I have the issue again. It sometimes happens if I copy the text, so it’s not something like I can reproduce like that, but if that happens I will test and will confirm here if it works.