Re: Extracting first 1 or 2 nymbers
- From: "raskew via AccessMonster.com" <u28575@uwe>
- Date: Sun, 11 Mar 2007 12:43:51 GMT
John -
Good catch! Had me scratching my head for a while until I realized the
string(s) in question were being interpreted as scientific notation. Am
going to have to brush-up on regular expressions.
Best wishes - Bob
John Nurick wrote:
Hi Bob and Steve,
This will work most of the time but will give unexpected results if the
string starts with digits, then has a letter d or e (or D or E), and
then one or more digits:
? Val("56D5")
5600000
One (of many) alternatives is to use a regular expression, e.g. with the
rgxExtract() function at
http://www.j.nurick.dial.pipex.com/Code/index.htm
?rgxextract("56D5", "^\d+")
56
Hi Steve -[quoted text clipped - 14 lines]
thanks for any and all help
--
John Nurick [Microsoft Access MVP]
Please respond in the newsgroup and not by email.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/200703/1
.
- References:
- Re: Extracting first 1 or 2 nymbers
- From: raskew via AccessMonster.com
- Re: Extracting first 1 or 2 nymbers
- From: John Nurick
- Re: Extracting first 1 or 2 nymbers
- Prev by Date: Re: Extracting first 1 or 2 nymbers
- Next by Date: Re: CreateQueryDef
- Previous by thread: Re: Extracting first 1 or 2 nymbers
- Index(es):
Relevant Pages
|