-------------------------------1149157088
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
How I can to check float value, with regular expression. Also need check
a integer with float values.
I do not know exactly what you mean by this:
do you want to find a string that could represent a float (resp. integer)
number
in a text ?
That could be a string made up of
- an arbitrary number of 0,1,..,9 , followed by a dot, followed by an
arbitrary number
of 0,1,2,...,9 in case of a float number,
- an arbitrary number of 0,1,..,9 in case of an integer number.
Then, you could do this
class String
def scan_for_numbers
int_regexp +*\-*[0-9]+/
fl_regexp +*\-*[0-9]+\.[0-9]+/
temp¥ç
¥ç¥£¡¬¥¥
¥ç ¥ç¡£¥£¥ã¥¡¥¡¥¥
¥ç¥£¡¬¥¥
¡¬
¥ç ¡¬¥ç¥£¥ã¥¡ ¡£¥¡¥¥
¥ç ¡¬¥ç¥£¥ã¥¡ ¡£¥¡¥¥
¡¬
¡¬¡¬ ¥å¥¢¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¥ç¡¼¥± ¥ã ¥Î ¥¢
¥ã ¡¼¥ç¥ª¡¼ ¡¼ ¥ç¥¡
졬¥ç¡¬¡¨Â
¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å
¥³
¥å¥¢¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¥ç¡¼¥± ¡£¡¼ ¡£¥¢
¡£¡¼¥ç¥ª¡¼ ¡£
¥Ä ¥ã
¥Á
¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥å¥¢¥¢¥¨¥±¥¢¥ª¥¡¼¥¯¥¯¥å¥å