Web Images News Groups Scholar Blogs Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Seek Filter Include Example
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
gimme_this_gimme_that@yah oo.com  
View profile  
 More options Nov 6, 12:33 am
Newsgroups: microsoft.public.scripting.vbscript
From: "gimme_this_gimme_t...@yahoo.com" <gimme_this_gimme_t...@yahoo.com>
Date: Thu, 5 Nov 2009 16:33:08 -0800 (PST)
Local: Fri, Nov 6 2009 12:33 am
Subject: Seek Filter Include Example
This creates an Array M and fetches the elements having cc - so it
displays dccr....

M= Split("bbadccraddaeea","a")
B = Filter(M,"cc")
WScript.Echo Join(B,",")

Filter also has this syntax:

Filter(Array,Search[,Include[,Mode]])

Can someone create an example based on these variables that utilizes
Include?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Mueller [MVP]  
View profile  
 More options Nov 6, 1:13 am
Newsgroups: microsoft.public.scripting.vbscript
From: "Richard Mueller [MVP]" <rlmueller-nos...@ameritech.nospam.net>
Date: Thu, 5 Nov 2009 19:13:29 -0600
Local: Fri, Nov 6 2009 1:13 am
Subject: Re: Seek Filter Include Example

<gimme_this_gimme_t...@yahoo.com> wrote in message

news:b1cc3104-0a64-41f1-a956-41655ff3af62@y28g2000prd.googlegroups.com...

The Include parameter is a boolean. True (the default), means the new array
will only contain elements of the original that include the Search pattern.
False means the array will contain elements that do not include the Search
pattern. For example, this code:
===============
Option Explicit
Dim M, B, C, D

M = Split("bbadccraddaeea", "a")
Wscript.Echo Join(M, ",")
Wscript.Echo "..."

B = Filter(M, "cc", True)
Wscript.Echo Join(B, ",")
Wscript.Echo "..."

C = Filter(M, "cc", False)
Wscript.Echo Join(C, ",")
Wscript.Echo "..."

D = Filter(M, "cc")
Wscript.Echo Join(D, ",")
========
Results in the following:

bb,dccr,dd,ee,
...
dccr
...
bb,dd,ee,
...
dccr

My reference that describes this function states that the default for
Include is False, but the example above shows this to not be the case. The
default seems to be True.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gimme_this_gimme_that@yah oo.com  
View profile  
 More options Nov 6, 5:09 am
Newsgroups: microsoft.public.scripting.vbscript
From: "gimme_this_gimme_t...@yahoo.com" <gimme_this_gimme_t...@yahoo.com>
Date: Thu, 5 Nov 2009 21:09:19 -0800 (PST)
Local: Fri, Nov 6 2009 5:09 am
Subject: Re: Seek Filter Include Example
So Include is a boolean?

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Mueller [MVP]  
View profile  
 More options Nov 6, 2:14 pm
Newsgroups: microsoft.public.scripting.vbscript
From: "Richard Mueller [MVP]" <rlmueller-nos...@ameritech.nospam.net>
Date: Fri, 6 Nov 2009 08:14:30 -0600
Local: Fri, Nov 6 2009 2:14 pm
Subject: Re: Seek Filter Include Example

<gimme_this_gimme_t...@yahoo.com> wrote in message

news:35f2da1d-c9ea-414b-a333-786f3a9ce3e3@b25g2000prb.googlegroups.com...

> So Include is a boolean?

Yes.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google