Check a specific format (numbers and letters)

Hi,

I want to check the format of a text field to spot any input which would differ from this pattern:

[4 numbers][2 letters][1 number]
i.e.: 2019AA1

I tried with regex extracts but it doesn’t works.

Hey Julien,

Welcome to Bubble!

Maybe this example will get you started. It evaluates the value of an input field with the following regex:

^[0-9]{4}[a-zA-Z]{2}[0-9]$

and turns the font red if it doesn’t match. If the first item of the regex extract is empty it didn’t pass the check. If it is not empty, it passes.

Looks like this:
regex

You should be able to use this extract method in a variety of places to match your actual use case.

–Ken



Looking to accelerate your app development?

Development of Advanced Apps at https://uniqueideas.com or schedule a free intro session :gift:

Ken Truesdale
LinkedIn

1 Like

Thanks mebeingken, this is perfect! :+1: