modify reg expr for code