Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8057901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:10:57+00:00 2026-06-05T09:10:57+00:00

i have the following code Regex R = new Regex(my regex); var q =

  • 0

i have the following code

Regex R = new Regex("my regex");
var q = from c in db.tble1
        where R.IsMatch(c.text)
        select c;

and while debugging i saw in the q result this message

Method ‘Boolean IsMatch(System.String)’ has no supported translation to SQL.”} System.SystemException {System.NotSupportedException}

so what have i done wrong ?

Edit:I learned that the method has no supported translation to SQL
but how to solve this

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T09:10:59+00:00Added an answer on June 5, 2026 at 9:10 am

    Regex has no supported translation to SQL. The error says it all. You can’t use regex in LINQ to SQL.

    Try using a like or substring comparison instead:

    var q = from c in db.tble1
            where c.text.StartsWith("x") && c.text.Substring(2, 1) == "y"
            select c;
    

    Or, you could perform an in memory regex comparison. You can do this by calling ToList() before using the Regex:

    Regex R = new Regex("my regex");
    var q = from c in db.tble1.ToList()
            where R.IsMatch(c.text)
            select c;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: string filterTerm = txtDocFilterTerm.Text.ToLower(); var regEx = new Regex(filterTerm);
I have the following code: var regex = new Regex(@^\d+\b); Console.WriteLine(regex.IsMatch(x 10, 2)); //
I have the following code (AS3 & CS 5.5): var regEx:RegExp = new RegExp(/(?:^|\s)(\#[^\s$]+)/g);
I have the following code: $postcode = $form->createElement('text', 'postcode'); $postcode->setLabel('Post code:'); $postcode->addValidator('regex', false, array('/^[a-z]{1,3}[0-9]{1,3}
I have the following code: $sfKeyword = new Zend_Form_SubForm(); $tfKeyword = $sfKeywords->createElement('text', 'keyword'); $tfKeyword->setLabel('Keyword:
I have a following regex expression in javascript var reg = new RegExp(^[(]?[2-9]\d{2}[)]?[\-. :]?[2-9]\d{2}[\-.
I have the following code: content = Regex.Replace(content, {%Pwd%}, pwd ?? ); If pwd
I have following code for loading image from url in xml parsing endElement method
I have the following code: var string = word1;word2;word3,word4,word5,word6.word7; function ends_with(string, character) { var
Possible Duplicate: Decode obfuscated JavaScript Question: I have the following javascript code: var _0xe91d=[\x28\x35\x28\x24\x29\x7B\x24\x2E\x32\x77\x2E

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.