I have a dataset with a char variable containing the following example values: AA1 AA2a AA10 AA11a BB3 BB3b BB10 BB11b Essentially I want to zero-pad the numeric part of each value (e.g. 'AA2a' becomes 'AA02a') and thought the prxchange function would be a quick and simple way of achieving this. However, the problem I have run into is how to reference the zero in the replacement text. So far the code is similar to: var2 = prxchange('s/^(\w{2})(\d{1})(\D?)$/$1$2$3/', -1, trim(var1)); How do I reference (and delimit) the zero character in the replacement string of the prxchange function ($1 ->0<- $2$3)?
... View more