Trailing spaces

I would like to use a filter to show table rows in base that have a chosen text field that has trailing spaces. I haven’t succeeded in doing this. For example I haven’t found a regular expression that works to do this.

Erred in commenting here

Hello,

Don’t know about doing this in a form filter or with a regular expression, but a quick method in SQL is:

Select * from "YOUR_TABLE" where right("YOUR_FIELD", 1) = ' '

Edit:

Have answer for form based filter. This worked for me:

LIKE  '% '

Have tried with HSQLDB form and PostgreSQL form and both work.

If this answers your question please tick the :heavy_check_mark: (upper left area of answer). It helps others to know there was an accepted answer.

Although it seems that I can’t use regular expressions in a filter, I can use regular expressions with a search and find trailing blanks in text fields that way. As long as the number of such matches is small, I can just edit the field and remove the trailing blanks.

I played with a simple form (and table) to verify that filtering using '% ’ worked. I then explored the Find & Replace control above the form. I couldn’t get it to find anything.

@wehmann12,

Sorry but I hardly ever use form filtering and don’t remember using Find & Replace in Base. That may be best in a new question.

My short testing consistently displayed - Search key not found