Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9718

REGEX Pattern Search, character classes with quantifiers do not work

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 7.7.3, 8.6.3
    • None
    • core/search
    • New

    Description

      Character classes with a quantifier do not work, no error is given and no results are returned. For example \d{2} or \d{2,3} as is commonly written in most languages supporting regular expressions, simply and quietly does not work.  A user work around is to write them fully out such as \d\d or [0-9][0-9] or as [0-9]{2,3} .

       

      This inconsistency or limitation is not documented, wasting the time of users as they have to figure this out themselves. I believe this inconsistency should be clearly documented and an effort to fixing the inconsistency would improve pattern searching.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bgfeldm Brian Feldman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: