- From: alan.garny at dpag.ox.ac.uk (Alan Garny)
- Subject: [cellml-discussion] Proposal: Standardised CellML real numberformat
- Date: Thu, 20 Sep 2007 07:04:15 +0100
>
Andrew Miller wrote:
>
> Alan Garny wrote:
>
>>>> Therefore, I think that we need to restrict it down to something like
>
>>>> (in regular expression syntax):
>
>>>>
>
>>>> (\-|)[0-9]+(\.[0-9]+|)(E(-|)[0-9]+|e(-|)[0-9]+|)
>
>>>>
>
>>>> In other words:
>
>>>> An optional - , followed by 1 or more digits from 0 to 9, followed
by
>
>>>> an optional decimal point (not a comma or momayyez) followed by an
>
>>>> optional E or e character with a possible sign and one or more digits
>
>>>> after it.
>
>>>>
>
>>> probably best to allow for an optional '+' or '-' both at the start
and
>
>>> following the exponent character.
>
>>>
>
>> So something like (assuming my use of the syntax is correct):
>
>>
>
>> (\+|\-|)[0-9]+(\.[0-9]+|)((E|e)(\+|\-|)[0-9]+)
>
>>
>
>> Note that I have also 'simplified' the exponent part.
>
>>
>
> I don't think the exponent should be mandatory, however, as this would
>
> break the majority of models in use.
>
>
agreed.
My bad, since I obviously agree with that. So, we should have:
(\+|\-|)[0-9]+(\.[0-9]+|)((E|e)(\+|\-|)[0-9]+|)
And if I have still got the syntax wrong, then please fix it, so we are done
and over with it.
Alan.
Archive powered by MHonArc 2.6.18.