Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad regex and Invalid character class name #145

Closed
pwfee opened this issue Apr 5, 2017 · 4 comments
Closed

Bad regex and Invalid character class name #145

pwfee opened this issue Apr 5, 2017 · 4 comments

Comments

@pwfee
Copy link

pwfee commented Apr 5, 2017

It works well in nano 2.7.4 on my mac, but it warning me "bad regex" when I upgrade to nano 2.8.0 by brew.

I tried to fix out that problem and found that I can replaces the characters '<' and '>' by \b in all the nanorc file, and the error message gone. But it may not be a good solution.

http://jimmybonney.com/articles/configure_nano_syntax_highlighting_synology/

Error message:

Error in /Users/vinson/.nano/rpmspec.nanorc on line 3: Bad regex "[:<:]:": Invalid character class name

Error in /Users/vinson/.nano/rpmspec.nanorc on line 4: Bad regex "[:<:]:": Invalid character class name

@pwfee
Copy link
Author

pwfee commented Apr 7, 2017

When I upgraded nano to 2.8.0_1 ,the problem fixed! It seems to the brew problem.

@pwfee pwfee closed this as completed Apr 7, 2017
@scopatz
Copy link
Owner

scopatz commented Apr 11, 2017

Great!

@ai-danno
Copy link

Two things about this (for those who arrive here via Google search):

  1. This problem still exists in nano 3.1 on OpenBSD 6.4

  2. The fix is not to replace merely the '<' and '>' characters with '\b', but rather to include the surrounding ':' characters of them as well. AKA, replace ':<:' and ':>:' with '\b'.

That is the fix for my particular situation.

@scopatz
Copy link
Owner

scopatz commented Jun 20, 2019

PRs welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants