Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Tom McGinty
  Where is Tom McGinty?
 New York
 New York - United States
 Tom McGinty
 Tags
Subject: Wildcard Criteria in Program
Thread ID: 331419 Message ID: 331419 # Views: 56 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Thursday, December 29, 2011 7:14:15 PM         
   


I'm using an array and GETWORDNUM to evaluate text files on a line-by-line basis. I need to pluck out the first occurrence in each line where a "word" has a length of 7 and at least one numeric character anywhere in the string. I can't figure out how to include both criteria in an iif. This is how it would look with only the length and checking only the first three words in each line:

d = MyArray(1,i)

iif(len(getwordnum(d,1)) = 9, getwordnum(d,1),;
iif(len(getwordnum(d,2)) = 9, getwordnum(d,2),;
iif(len(getwordnum(d,3)) = 9, getwordnum(d,3),;
'ERROR')))

Does anyone know how to add the second criteria that the string include a numeric character (0-9)?

Thanks in advance.

Tom

ENTIRE THREAD

Wildcard Criteria in Program Posted by Tom McGinty @ 12/29/2011 7:14:15 PM
RE: Wildcard Criteria in Program Posted by tushar @ 12/29/2011 7:46:52 PM
RE: Wildcard Criteria in Program Posted by Tom McGinty @ 12/29/2011 7:50:01 PM
RE: Wildcard Criteria in Program Posted by Tom McGinty @ 12/29/2011 8:48:19 PM
RE: Wildcard Criteria in Program Posted by Koen Piller @ 12/30/2011 1:46:20 AM
RE: Wildcard Criteria in Program Posted by Tom McGinty @ 12/30/2011 1:52:50 AM
RE: Wildcard Criteria in Program Posted by Jun Tangunan @ 12/30/2011 4:08:41 AM
RE: Wildcard Criteria in Program Posted by Tamar Granor @ 1/2/2012 10:55:05 PM
RE: Wildcard Criteria in Program Posted by Jijo Pappachan @ 1/3/2012 10:44:53 AM