Little help with Regex input validation please

I need to use Regex validation to validate id’s which varies per country. For example:
Belgium: BE123456789
Netherlands: NL123456789B01

In my form I have a country dropdown. After selection it’s clear how the id pattern should look like.

The problem is that i have 0 knowledge about Regex and when I look at the explanation it seems I am looking to abacadabra :woozy_face:. But I just need to know what I have to fill in the regex pattern field for BE123456789 and NL123456789B01. There are more combinations but perhaps after two examples I can figure these out.
Schermafbeelding 2020-02-20 om 20.56.38
Can you help a regex illiterate? :laughing:

So after research and a good night sleep I figured it out :-). Here are the steps:

  1. First view this tutorial on youtube: https://www.youtube.com/watch?v=sa-TUpSx1JA&t=900s. It takes 37 minutes but I understood after 10 minutes
  2. Then start creating on https://regex101.com/ (If you want to validate CE1234 then the regular expression = CE\d\d\d\d)
  3. Now incert your regex pattern in the Bubble regex pattern field and do count =1. This means the regex pattern validation = true = 1

8 Likes

Personally I would use https://regexr.com/. It’s slightly more helpful as it provides cheat sheets and documentation.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.