Working with Regular Expressions

The ANPR LUMO is a very advanced license plate camera, and in addition to many functionalities such as converting a license plate into a wiegand format, it also offers the possibility to apply "regular expressions" to the access lists available in the LUMO camera.

With the regular expressions it is possible to recognize patterns in the read result. A regular expression describes a collection of strings without the need of listing them all.

This makes it possible, for example, to save a registration number only if it meets the conditions in the regular expression.

A simple example of a regular expression is:

A + B matches one of the following: AB or AAAAAAAB, but not B or BBBB

Detailed explanations of regular expressions can be found in the installation guide.

Below some examples of regular expressions which can be added to the Lumo camera: 

KEMMLER/ADR CODE

As soon as a vehicle is recognized with a KEMMLER / ADR code, the relay of the LUMO must be switched.
A KEMMLER / ADR CODE is used to indicate on vehicles that these hazardous substances are being transported.

A Kemmler / ADR code always contains only numbers, here an example of a Kemmler code.mceclip0.png

A regular expression that fits this is [0-9] 6
This expression searches only for number-only license plates that are 6 characters long.

We add this expression to the ACCESS List, make sure you enable the "USE REGEX" option.

mceclip1.png

Then the action needs to be defined, for that we add a digital output on "WHITELIST MATCH" 

mceclip2.png

If now a vehicle arrives with a kemmler/ADR code, the relay will be activated.

Company vehicles

At a company, vehicles are driving around that have a license plate that starts with the company name, in this example there are license plates that start with NEDAP followed by a set of numbers.

An example is: NEDAP1234
In this example we are going to activate a relay when a license plate is read that consists of the text NEDAP followed by 4 numbers. If a license plate is read that has, for example, 3 numbers, it is ignored.

A regular expression that fits this is NEDAP[0-9]{4}
This expression only searches for license plates starting with NEDAP followed by 4 numbers.

We add this expression to the ACCESS List, make sure you enable the "USE REGEX" option.

mceclip1.png

Test Regular expressions

There are unlimited possibilities with regular expressions, to try and test regular expressions you can use the website https://regex101.com/ 

Here you can configure the regular expression and test them against the string.

below an example where the regular expression NEDAP[0-9]{3}E is tested

mceclip2.png

 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request