Menu ▾ ▴

Request for New RegEx Parameters

O(1)
2009-07-27
2012-11-13
  • O(1)

    O(1) - 2009-07-27

    I use Notepad++ a *LOT* for quickly cleaning up text files I need to import into various programs I build/modify daily.  It's a major help, to say the least.  In the course of this, I make constant use of regular expressions in order to do complicated cleanup of the data.  Given Notepad++'s ease of use, I was wondering if it might be possible to add 3 new metacharacter-features to the Regular Expressions in Notepad++.  In no particular order, here they are:

    I) INTERVAL MATCHING using braces (or whatever brackets work):  {min,max}

    a) Interval Matching, like: {3}, where {3} means to match three instances of the previous character or set.

    b) Range Interval Matching, like {1,5}, where you can match a minimum and a maximum number of instances of characters or sets that are to be matched.

    c) "AtLeast" Interval Matching, like {6,}, where a match isn't made unless you match At Least 6 matches (or more) of the preceding character or set.

    d) "AtMost" Interval Matching, like {,3}, where a match isn't made unless you match anywhere from 0 to 3, but no more than (or At Most) 3 matches of the preceding character or set.

    II) OR feature, using something like the vertical bar: "|"

    Many thanks.

     
    • cchris

      cchris - 2009-07-28

      This has been possible since a few months, and actually a user managed to get them working (se the More regular expression operators IdeaTorrent item, it is a little old). Bu t it is certainly non trivial to implement.

      I have a dream that 5.5 will bring regexes in sync with what is being used everywhere else. But this is a dream, not a promise.

      CChris

       
    • O(1)

      O(1) - 2009-07-27

      III) POSIX CHARACTER CLASSES, like [:alnum:], [:alpha:], [:blank:], etc.

      Again, many thanks.