Text and not text in a string

2008-09-20 Thread Bill Vlahos
I want to determine if a string contains a word but doesn't contain two other words. For example (in the message box): put "Internet Work" contains "Work" is true How do I ask if the string contains "Internet" but not "Work" or "Home"? Bill Vlahos _

Re: Text and not text in a string

2008-09-20 Thread Terry Judd
How about... put (myString contains "cat") and not((myString contains "dog") or (myString contains "mouse")) Terry... On 21/9/08 8:35 AM, "Bill Vlahos" <[EMAIL PROTECTED]> wrote: > I want to determine if a string contains a word but doesn't contain > two other words. > > For example (in the m

Re: Text and not text in a string

2008-09-20 Thread Bill Vlahos
Terry, That did it. Thanks Terry. Bill Vlahos On Sep 20, 2008, at 3:42 PM, Terry Judd wrote: How about... put (myString contains "cat") and not((myString contains "dog") or (myString contains "mouse")) Terry... On 21/9/08 8:35 AM, "Bill Vlahos" <[EMAIL PROTECTED]> wrote: I want to de

Re: Text and not text in a string

2008-09-20 Thread Ken Ray
> How do I ask if the string contains "Internet" but not "Work" or "Home"? You could also do: if ("Internet" is in tString) and ("Work" is not in tString) and ("Home" is not in tString) then -- whatever you want to do end if Ken Ray Sons of Thunder Software, Inc. Email: [EMAIL PROTECTE

Re: Text and not text in a string

2008-09-20 Thread Jim Ault
Two more ways ... easier readability to use the continuation ¬ character [ option-L on the Mac ] if ("Internet" is in tString) ¬ and not("Work" is in tString) ¬ and not("Home" is in tString) then do this end if - if ("Internet" is in tString) and ¬ not("Work" is in tString or "Home

Re: Text and not text in a string

2008-09-21 Thread Stephen Barncard
Actually the "¬" (which I myself have used for centuries) has been diminished in favor of "\". The "¬" is not cross-platform it's there for backward compatibility with imported HC scripts. It's not even in the dictionary anymore. Two more ways ... easier readability to use the continuatio

Re: Text and not text in a string

2008-09-21 Thread Jim Ault
Good catch, Stephen. Old habits, but cross-platform is the way to go. Correction made :-) Thanks, Jim Ault Las Vegas On 9/21/08 12:10 AM, "Stephen Barncard" <[EMAIL PROTECTED]> wrote: > Actually the "¬" (which I myself have used for > centuries) has been diminished in favor of "\". > The "¬"