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

  • SEARCH
  • Home
  • 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 7587535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:41:53+00:00 2026-05-30T19:41:53+00:00

Regular expressions allows for the pattern matching syntax shown below. I’m trying to implement

  • 0

Regular expressions allows for the pattern matching syntax shown below.
I’m trying to implement a powerful search tool that implements as many of these as possible.
I’m told that edismax is the most flexible tool for the job.
Which of the pattern matching expressions below can be accomplished with edismax? Can I do better than edismax? Can you suggest which filters and parser patches I might use to work towards achieving this functionality? Am I dreaming if I think Solr can achieve acceptable performance (i.e. server-side processing time) of these kinds of searches?

regular expression syntax & examples from mysql

  1. ^ match beginning of string. 'fofo' REGEXP '^fo' => true
  2. $ match end of string. 'fo\no' REGEXP '^fo\no$' => true
  3. * 0-unlimited wildcard. 'Baaaan' REGEXP 'Ba*n' => true
  4. ? 0-1 wildcard. 'Baan' REGEXP '^Ba?n => false'
  5. + 1-unlimited wildcard. 'Bn' REGEXP 'Ba+n' => false
  6. | or. 'pi' REGEXP 'pi|apa' => true
  7. ()* sequence match. 'pipi' REGEXP '^(pi)*$' => true
  8. [a-dX], [^a-dX] character range/set 'aXbc' REGEXP '[a-dXYZ]' => true
  9. {n} or {m,n} cardinality notation 'abcde' REGEXP 'a[bcd]{3}e' => true
  10. [:character_class:] 'justalnums' REGEXP '[[:alnum:]]+' => true
  • 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-30T19:41:54+00:00Added an answer on May 30, 2026 at 7:41 pm

    Version 4.0 of Lucene will support regex queries directly in the standard query parser using special syntax. I verified that it works on an instance of Solr I am running, built from the subversion trunk in February.

    Jira ticket 2604 describes the extension of the standard query parser using special regex syntax, using forward slashes to delimit the regex, similar to syntax in Javascript. It seems to be using the underlying RegexpQuery parser.

    So a brief example:

    body:/[0-9]{5}/
    

    will match on a five-digit zip code in the textual corpus I have indexed. But, oddly, body:/\d{5}/ did not work for me, and ^ failed as well.

    The regex dialect would have to be Java’s, but I’m not sure if everything in it works, since I have only done a cursory examination. One would probably have to look carefully at the RegexpQuery code to understand what works and what doesn’t.

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

Sidebar

Related Questions

I have been trying to create a regular expressions pattern that matches any reference
I am trying to create a regular expression in C# that allows only alphanumeric
I have two regular expressions that validate the values entered. One that allows any
I'm trying to get a regular expression that allows between 6 - 15 characters
I am building an application that allows you to apply styles to regular expressions
It appears that most modern languages and tools allow for extended regular expressions, and
Because regular expressions scare me, I'm trying to find a way to remove all
I have 5 functions that check user input against regular expressions...these regular expressions have
I need to find attribute values in an ASPX file using regular expressions. That
I am trying to create a regular expression pattern in C#. The pattern can

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.