Hi @NigelG
that is correct and thanks a lot for this idea. I just tried it and it is working. I used the :find&replace to find the expression and replace it by the multiple of the relevant state and the regex extraction of the text.
The problem however is that in a block of text I can have different relevant numbers (“take #1# egg and #250# ml of milk”) . The :find&replace doesn’t allow me to reference each pattern found dynamically. I could have a different sign for each number #1#, {2}, [3] etc. and have several :find&replace for that, but it would always be limited to certain amount of numbers…