bugGNU nano - Bugs: bug #63140, [Wish] add support for...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #63140: [Wish] add support for Perl-compatible regular expressions (PCRE)

Submitter:  James E. Tilley <tilrman>
Submitted:  Fri 30 Sep 2022 02:05:28 PM UTC
   
 
Severity:  1 - Wish Status:  Need Info
Assigned to:  None Open/Closed:  Closed

Mon 28 Nov 2022 08:46:22 AM UTC, comment #3: 

Closing this due to lack of response.

Benno Schulenberg <bens>
Group administrator
Mon 10 Oct 2022 07:46:43 AM UTC, comment #2: 

Ping, James?  Can you confirm or deny whether POSIX regexes are compatible with PCRE?  That is: whether valid POSIX EREs are also valid Perl-compatible regexes?  (But not the other way around, of course.)

Benno Schulenberg <bens>
Group administrator
Fri 30 Sep 2022 03:25:12 PM UTC, comment #1: 

If the regexes in the existing syntax/*.nanorc files are not compatible with PCRE, then adding support for PCRE is out of the question.  Having two versions of the syntax files is madness.

If they are compatible, then please provide a patch that adds a --with-pcre option to ./configure.  With this option, configure should fail when a PCRE lib does not exist.  The default will continue to be the POSIX regex engine.

There will not be an option or a hotkey two switch between POSIX and PCRE -- if the user chose to build with PCRE, then PCRE it is.  (If sometimes they want POSIX regexes, then they should build two nanos.)

Benno Schulenberg <bens>
Group administrator
Fri 30 Sep 2022 02:05:28 PM UTC, original submission:  

I believe nano uses POSIX ERE for its find-replace feature. I would like to have Perl-Compatible Regular Expressions (PCRE) available as an optional alternative regex engine for find-replace.

PCRE might be detected by autoconfig and built in only if it exists. A build-time flag could prevent PCRE from being built in for users who do not want PCRE.

A nanorc option should be available to set PCRE as the default regex engine for find-replace.

In the Where menu, a hotkey or hotkeys should allow switching regex engines.

For compatibility, the nanorc directives that use regexes should probably not use PCRE by default. However, it might be nice to have a way to allow PCRE in nanorc directives, either via a second nanorc option or by using a special syntax that indicates a regex is PCRE.

James E. Tilley <tilrman>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by tilrman (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-11-28 bens Open/ClosedOpen Closed
    2022-10-10 bens StatusNone Need Info
    2022-10-09 bens Summary[Wish] Perl-Compatible Regular Expressions (PCRE) [Wish] add support for Perl-compatible regular expressions (PCRE)
    2022-09-30 bens Severity3 - Normal 1 - Wish

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code