I have this expression in the field calculator:
regexp_replace('1', '^(\\d+)', rpad('\\1', 3, '0') ) gives 01 rather than 001 as expected.
the *pad functions work fine when called outside regexp_replace
Weird! This has to be a bug? or am I missing something?
If it is a bug I'll log something in the issue tracker.
BTW I was delighted when I found I could use complex expressions including functions in the third parameter of regexp_replace! kudos to the QGIS developers!
rpad('22',3,'0')give you? – Nathan W Jan 19 '14 at 11:07