ocelot
04-23-2009, 05:54 AM
Hi all,
Im trying to write a regular expression whereby a decimal is converted into
"percentage format". The three scenarios that can happen and that I
want changed are for example:
0.01 changed to 1
0.10 changed to 10
0.134 changed to 13.4
Ive started but am a bit stuck now:
expression="\A(.*)\.(.*)\Z"
expression="\A(\d{2})(:?.*)\Z"
Any help please?
thanks!
ocelot
Im trying to write a regular expression whereby a decimal is converted into
"percentage format". The three scenarios that can happen and that I
want changed are for example:
0.01 changed to 1
0.10 changed to 10
0.134 changed to 13.4
Ive started but am a bit stuck now:
expression="\A(.*)\.(.*)\Z"
expression="\A(\d{2})(:?.*)\Z"
Any help please?
thanks!
ocelot