Community
Connect with us and enhance your M-Files experience using Extension Kit for M-Files. Here is how to get started.

Hi
I tried to use <<REGEX('<input>','(?<=\d)(?=(\d{3})+(?!\d))','idx'>> with a floating number (money, 2 digits), not a integer. I also tried (?<=\d)(?=(\d{3})+\b) but this is also not working.
How to use the REGEX functionality in the Extended Auto Properties
Regards
Daniel
Hi @daniel-mislovic,
In the expression parser you provided there is a ")" missing at the end, as well as a number for the "idx" - <<REGEX('<input>','(?<=\d)(?=(\d{3})+(?!\d))','0')>>.
The rights syntax would be: <<REGEX('input', 'pattern', 'match-idx', 'group-idx')>>
Where:
- input - string to use REGEX on
- pattern - your regex pattern
- match-idx - zero based index of matched result to return
-
If match-idx and group-idx are empty, they are set to 0 as default.
Please note that single quotation mark is required.
Regarding the use case for adding the ' after every third number - currently only possible solution would be to write a regex that groups the number into group of 3 and saves each group into separate properties (PD.Group1, PD.Group2). You can then use CONCAT function (Auto Properties or Property Operations module) and merge those properties with separator '.
I have created a ticket for our DEV team for a new function for regex that would allow adding separators between groups easier (without new properties).