Regex in datamapper post function

is it possible to use a regex in the post function when extracting data from a pdf region.

e.g. PDF region shows:
My dear customer
Customer#: 123456

and I want to extract just the number AFTER the word “Customer#:”, omitting the first line.

thx,

Ralf.

Absolutely.

For example, the following would remove any non digit characters from the string.

replace(/\D/g,‘’);

1 Like

Albert, thx!
wasn’t aware of replace accepting regex!

replace(/(.+Customer# )(\d+)/g,‘$2’);

did the job with Customer# changing its vertical position.

Ralf.