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 6971411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:50:12+00:00 2026-05-27T16:50:12+00:00

As an input I’ve got a plain SQL query smth like: select * from

  • 0

As an input I’ve got a plain SQL query smth like:

select * from (
    select * from Table where id in (1,2,3,4,5,6,642,7,8,9)
        or another_id in (1,2,3,4,5,6, 34 ,7 , 8,9))
where yet_another_id in (1,2)

I want to find all IN clause statements where the amount of arguments passed in is greater than XXX.
So far I’ve came up with this solution.

 ^.*\s*+(?:in)+\s*+(\((?:\s*+\d+\s*+\,?+){XXX,}+\){1}).*$

where XXX is the number of arguments.
Obviously, the first part:

 ^.*

eats all IN clause statements except the last one. How can I fix that? Any suggestions how can I improve the regex?

  • 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-05-27T16:50:13+00:00Added an answer on May 27, 2026 at 4:50 pm

    Try this here

    \bin\b\s*(?:\((?:\s*\d+\s*\,?){5,}\))
    

    So I removed some stuff from your expression and fixed an obvious error (\(?: where you escaped the wrong bracket.

    The \b is a word boundary.

    This is working now for me here on Regexr

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;} input,textarea,select{*font-size:100%;} This is from the YUI reset css. What does the * before
input is a string (var str) something like this: <<hello there//abcd//1234>> I want to
Input: I want to remove double space from textbox. Output: I want to remove
Input: I have a LaTeX file, with plain text & math formulas. Desired output:
input: name <hui.li@xxx.ch>; hans@dhdfhgdfgh <hans.dampf@xxxx>; Output: e1@mail.com, e2@mail.com, e3@mail.com,e@mail.com I want to erase the
Given input like <a> <b> <c>everything below</c> <d></d> </b> <b> <c>everything below</c> <d></d> </b>
My input elements are followed by a div. I would like to set the
input is like this 5 // is # of vertices 1 1 0 1
Input fields are usually associated to forms, but I would like to use them
Input string is something like this: OU=TEST:This001. We need extra This001. Best in C#.

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.