Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing for numeric char in a string
Message
From
17/11/2001 09:02:01
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00582918
Message ID:
00583104
Views:
38
>>What's the best way to test for the existance of a numeric char in a string? If I had dumbvar='Johnson x4588', I would want to know that there are numbers embedded. -TB
>This is overkill for this problem, but the VBScript.RegExp object allows you to check for a wide range of patterns in a string:
>
>
oRegExp = CREATEOBJ('VBScript.RegExp')
>WITH oRegExp
>   .Pattern = '[0-9]'
>   ? .Test(dumbvar)
>ENDWITH
Hiya Ed,
For this one yes but if I had to create a generic pattern searcher I think it would pay the milliseconds back :)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform