In J, a numeric constant begins with _ or 0-9, 
continues with _  or 0-9 or . or a-z or A-Z, and ends
with a character which is not one of the preceding
or at the end of the string.  This is modeled in the ;: 
dictionary page. 
http://www.jsoftware.com/help/dictionary/d332.htm
The model also handles numeric vector constants.

The word formation rules specify as "number" 
strings that are currently not interpreted as numbers.  
For example 2i3j4k5 (future quaternion?)



----- Original Message -----
From: bill lam <[email protected]>
Date: Monday, January 26, 2009 22:29
Subject: Re: [Jprogramming] regex for j numeric constants
To: [email protected]

> I think that does not yet cover the case of base and rational,
> eg,
> 
>    r0 rxall '16babde 123r222'
> +--+---+---+
> |16|123|222|
> +--+---+---+
>    ". '16babde 123r222'
> 43998 0.55405405
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to