Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Remove 'non-breaking spaces' using Regex in a Form

jayden.webb
February 5, 2025

I'm having issues with a Form that customers are uploading non-breaking space characters into a Long Text field.

 

Using regex testing sites I was able to get the following pattern:

[^\h\s]+

 

The above pattern matches characters that aren't horizontal whitespace (catches the ' ' non-breaking space) or whitespace.

When I enable the "match regex pattern" option on my Long Text field, enter my pattern, and attach a Regex error message I don't receive the error message when testing and space characters are still accepted.

 

Any one run into this issue before? Any help is appreciated, thank you!

1 answer

0 votes
Salih Tuç
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 8, 2026

Hi @jayden.webb ,

I think you're almost there. Remove "^" character in the regex and try it again. That character is using for finding values "at start".

So, you are basically saying that:

"Remove one or more whitespaces at start"

But you want:

"Remove one or more whitespaces in text"

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events