[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Finding float numbers
- From: Asko Kauppi <askok@...>
- Date: Tue, 31 Mar 2009 16:00:14 +0300
4 in your code is not a float. It's an integer.
Michael Gerbracht kirjoitti 31.3.2009 kello 15:39:
I need to convert float numbers into a string in a certain way. The
original string looks like:
I need to convert it into:
so all floating point numbers n need to be replaces by @"n". Can you
suggest a good way to do that?
My main problem is to define a pattern for searching that matches all
floating point numbers, but not e.g. '4+5.2' in the above example.
Is it possible with lua or do I need the lpeg extension?
Thank you very much!
 I need to do that because I use RiscLua which supports floating
numbers only as userdata.