Akeneo attribute regex wir OR "|" not working

Viewed 56

The problem in Akeneo seems to be that simple regex combinations not working. I think the functionality (a single or group regex combination) is not integrated/implemented proper in Akeneo. If there is anybody out there who knows a trick to do a regex combination please let me know.

Tried to figure out how to make regex with | OR working in Akeneo "attributes".

the simple Example not working either a syntax error or no matching in Akeneo:

find this "323" or find "123456"

\d{3}|\d{6} 

Can anybody help?

1 Answers

According to the documentation, you need to use regex literal notation, and anchor the match both at the start and end of the string (so, add a grouping):

/^(\d{6}|\d{3})$/

Here, / are regex delimiters, ^ matches the start of string, (...) is a capturing group that contains two alternatives, six digits or three digits, and then end of string anchor, $, follows.

Related