Fix Bug in quey 'is_a_valid_number'

Remove the space after :  in the regular expression "-?(?: 0|[1-9]\d*)(?: \.\d+)?(?: [eE][+-]?\d+)?\b"
This commit is contained in:
jvelilla
2008-08-08 11:17:32 +00:00
parent b674dbddf7
commit c59bc37a40

View File

@@ -341,12 +341,13 @@ feature {NONE} -- Implementation
do
create regexp.make
create word_set.make_empty
a_number.right_adjust
a_number.left_adjust
word_set.add_string ("0123456789.eE+-")
regexp.set_word_set (word_set)
number_regex := "-?(?: 0|[1-9]\d*)(?: \.\d+)?(?: [eE][+-]?\d+)?\b"
number_regex := "-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?\b"
regexp.compile (number_regex)
if regexp.matches (a_number) then
a_number.right_adjust
if a_number.is_equal (regexp.captured_substring (0)) then
Result := true
end