InseeFr / Trevas

Transformation engine and validator for statistics.
MIT License
12 stars 5 forks source link

Calc with replace currently doing nothing #328

Closed NicoLaval closed 5 months ago

NicoLaval commented 6 months ago

@noahboerger you reported calc with replace currently doing nothing.

Could you precise please?

noahboerger commented 5 months ago

The example i have tested is from the BdI testcases the one under "string/pattern_replacement_3".

The following statement has not been doing the expected replacement, the calculated Text_2 was just the same as Text_1: result:= ds1[ calc Text_2:= replace(Text_1,"[a|e|i|o|u]")];

When i adjusted it to use the replace operator without calc it was working as expected: result := (replace(ds1[drop num_1],"[a|e|i|o|u]"))[rename Text_1 to Text_2];

NicoLaval commented 5 months ago

Related to #334