Re: regex failure
Andrew Sowerby <[email protected]>
| Newsgroups | gmane.editors.jedit.user |
|---|---|
| Message-ID | <CABzbc1rRdZVTGMN-kFqgCtMZZE8--5zWfeV4xNNZRFehQ_F=gw@mail.gmail.com> |
Hi, It works fine, as tested in jEdit 5.1.0. Actually, I've not noted any change in behaviour. I suspect you're seeing this issue because you have "ignore case" checked. Using your example, if you search for [A] with 'ignore case' checked it will match 'A' and 'a'. However, if you uncheck 'ignore case' the same search term will only match 'A'. If then, with "ignore case" still unchecked, and a search term of [Aa], you'll find that this matches exactly the same way as [A], or [a], with "ignore case" checked. This behaviour seems to be as expected, and I don't remember either REGEX standard that jEdit used ever overriding "ignore case" = "true". jEdit has been using java.util.regex.Pattern <http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html> for so long now, that I can barely remember how gnu.regexp worked (jEdit switched away from that back in 4.2, which came out in 2004)! I just tested again, using xsearch, which uses gnu.regexp and therefore works like jEdit used to prior to v4.2, and it works in exactly the same way *in this respect*. It's just horrible to use ;) - *Andrew* On 21 November 2016 at 10:08, e-letter <[email protected]> wrote: > Readers, > > For many years, simple regex search for upper case characters was easy > with '[A-Z]'. > > No more!!! > > Had to download some xsearch plugin! > > That didn't work either with '[upper]' or '[:upper:]' according to the > manual. > > Example: > > AOEUAEU euau > EOUAEUEAOUEOAUOAEUAEOAOE AUAEOU..KJA aeua,,.uoaejkoaeu > AEOUAAAEUAUA,. UEAUAU uaa,aeoaeuau > AUAPUAUKAUA.PA aua,.ua,aa,u,.u > > The manual page 'Appendix E. Regular Expressions' does not describe > how to search for upper case characters. It used to. > > The plugin manual is poor. > > If it worked, don't fix it ;) > > ------------------------------------------------------------ > ------------------ > -- > ----------------------------------------------- > jEdit Users' List > [email protected] > https://lists.sourceforge.net/lists/listinfo/jedit-users > ------------------------------------------------------------------------------ -- ----------------------------------------------- jEdit Users' List [email protected] https://lists.sourceforge.net/lists/listinfo/jedit-users