Hi Techies,
I need to generate a string with specified format where numbers are denoted with character '#'.
For example= AB#######123####D should generate AB+(seven digit random number)+123+(four digit random number)+D.
i.e. AB87934611232903D.
I have written a logic which works only if there is a single combination of # in given format. e.g. AB#######123D.
generatedString = strReplace(_numberFormat, strKeep(_numberFormat,'#'), customSysStringGenerator::randomDec(strLen(strKeep(_numberFormat, "#"))));
It seems I need to traverse each character and replace # with random number, but is there any way to make it with more elegant method, (may be regular expressions)
Any help is appreciated.
Thanks,
Sangram Shinde