I couldn't find this post on the web server, so I thought I'd r
Folks:

I couldn't find this post on the web server, so I thought I'd repost it.  Any 
thoughts on this?

Thanks,
--Phil

----- Forwarded Message ----
From: Phil Murnane <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: Phil Murnane <[EMAIL PROTECTED]>
Sent: Tuesday, August 21, 2007 10:32:23 AM
Subject: Wildcard in STRSTR function?


Folks:

Has anyone ever used a wildcard as the secnd parameter in a STRSTR() 
function?  I'm trying to test whether string2 exists in string1, where 
string2 may be a substring of string3 also in string one.  This is similar 
to finding a Group ID in a $GROUPIDS$ result.

Example:
ARS 6.3
string1 = ", 20070821-001, 20070821-002, 20070821-002-A, 20070821-003, "
string2 = "20070821-002"
string3 = "20070821-002-A"

I can't just use STRSTR(string1, string2) because even if string1 did not 
contain string2 this function would erroneously find the value, since 
string2 is a substring of string3.

Here's my syntax:
zScratchInteger = STRSTRC($string1$,(" %, " + $string2$ ) + ", %")

But this always returns -1 -- it never finds string2 in string1.

Is this because of the wildcard percent signs?

TIA,
--Phil


       
____________________________________________________________________________________Ready
 for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

Reply via email to