onetrueawk / awk

One true awk
Other
1.98k stars 159 forks source link

Don't prematurely end a regex expr when seeing a slash within a character class #136

Closed silverneko closed 2 years ago

silverneko commented 2 years ago

Fix #135

Tested with: $ ./a.out '/[/]/' => no error

millert commented 2 years ago

This is a duplicate of #81 which was not merged because it appears to violate POSIX. There are also various edge cases that would need to be handled. I have a more complete fix in https://github.com/millert/awk/commit/5101095c919531f51cb78ddce572392ca3abe4b8 if there is interest in it.

plan9 commented 2 years ago

different code to deal with this issue coming up.