String replace for personalize code generator
Posted
by Xurxof
on Stack Overflow
See other posts from Stack Overflow
or by Xurxof
Published on 2010-04-20T08:23:50Z
Indexed on
2010/04/20
8:43 UTC
Read the original article
Hit count: 189
I must do a automatic codes generator with user-configurable string with predefined keys and can not find a good way to do it. For example, a string
OT-{CustomCode}-{Date}-{##}
could generate codes
OT-C0001-20100420-01
OT-C0001-20100420-02
I thought of using RegExpr.Replace(), but I would have problems if the code of a customer was {##}
Any help is welcome! (and sorry for my english)
© Stack Overflow or respective owner