Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion C# Driver, using linq's In operater ($in) for regex
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
 
AG  
View profile  
 More options Oct 30 2012, 9:16 pm
From: AG <agarcia...@gmail.com>
Date: Tue, 30 Oct 2012 18:16:00 -0700 (PDT)
Subject: Re: C# Driver, using linq's In operater ($in) for regex

Is there a way to express the $in query using regular expressions in the c#
driver?

Something like this, but checking the regex against any member in the array?

Query.Matches("Series", BsonRegularExpression.Create(new
Regex(searchPattern, RegexOptions.IgnoreCase)))

Thanks.

On Monday, October 8, 2012 4:44:09 PM UTC-4, Sam Martin wrote:

> Hi all,

> think this should be a simple one, but cant suss the syntax.

> In mongo i can say

> db.coll.find({ "myatt": { $in : [/^x/,/^y/]} });

> Is this possible using the "In" linq to mongo extension method?

> I've tried passing the string[] as regex string but no surprise didn't
> work, do I have to use Inject()?

> TIA
> Sam


 
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.