On 26-JAN-2016, You Wrote:- .... ...... ........
Then run the RegExp search on your %_RefNo variable, and replace the stored value of %_RefNo with the result. Something like:- %_RefNo="000000%_RefNo"%- %SETPATTREGEXP="\d{7}?\z"%- %_RefNo='%REGEXPMATCH="%_RefNo"'%- These three lines would slot in before the last line of your existing code (%Subject=...). +++++++++++++++++ PERFECTO!!! thanks mate, works beautifully..... -- ramzan ________________________________________________ Current version is 6.6 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html