#324 text regonition patterns problems

Program (402)

I have a "texinfo" file regonition pattern, one of the
patterns is the following regular expression:


It was working fine with the last stable NEdit but
stopped highlighting any of those commands when I
installed RC2. The problem seems to manifest itself
when using the '@' character. The follwing expression
works fine though:


So `@` seems to work sometimes.

> nedit -V

UTF8 locale not supported.
NEdit 5.4RC2
Oct 20, 2003

Built on: Linux, 386, GNU C
Built at: Jan 12 2000, 07:21:24
With Motif: 2.1.30 [@(#)Motif Version 2.1.30]
Running Motif: 2.1 [unknown]
Server: The XFree86 Project, Inc 40200000
Visual: 24-bit TrueColor (ID 0x21, Default)
Locale: en_US.UTF-8


  • Eddy De Greef

    Eddy De Greef - 2003-10-23
    • milestone: 103146 --> development
    • status: open --> open-invalid
  • Eddy De Greef

    Eddy De Greef - 2003-10-23

    Logged In: YES

    In earlier versions of NEdit, the semantics of '<' and '>'
    (left and right word boundary) were rather unconventional.
    We have slightly changed them to better match what is
    understood as a word boundary in other regular expression
    implementations. (Check out the section on upgrading to 5.4
    in the README.)

    The problem in your case is that the '@' character is not a
    word character, so it can never be a left word boundary either.
    You can emulate the old '<' semantics with '(?<!\Y)' (the
    preceeding character is not a non-delimiter). In this case
    it can probably be simplified to '(?<!\w)'.

  • Tony Balinski

    Tony Balinski - 2003-10-24

    Logged In: YES

    A cure is to factor out the @ sign:


    Here we only check the end of word boundary. There doesn't
    seem to be much point checking the start of word, since it's
    already bounded by the '@'.

    You could go further - but I wonder if it gains anything:

  • Thorsten Haude

    Thorsten Haude - 2003-12-28
    • status: open-invalid --> closed-invalid
  • Thorsten Haude

    Thorsten Haude - 2003-12-28

    Logged In: YES

    So this is a feature, not a bug.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks