Discussion:
warning: regexp escape sequence `\"' is not a known regexp operator
(too old to reply)
Daniel Ajoy
2019-07-08 02:44:43 UTC
Permalink
3. The regex routines have been replaced with those from GNULIB, allowing
me to stop carrying forward decades of changes against the original
ones from GLIBC.
Hello,

I used to be able to use these regexp forms:

/ \"GET/ { ... }

now I get a warning:

warning: regexp escape sequence `\"' is not a known regexp operator

Should I change my code in this way:

/ "GET/ { ... }

This page:

https://github.com/soimort/translate-shell/issues/285

is confusing to me and makes be think that maybe I shouldn't, and that the issue will go away in a new gawk release.

Daniel
Janis Papanagnou
2019-07-08 06:28:02 UTC
Permalink
Post by Daniel Ajoy
3. The regex routines have been replaced with those from GNULIB, allowing
me to stop carrying forward decades of changes against the original
ones from GLIBC.
Hello,
/ \"GET/ { ... }
warning: regexp escape sequence `\"' is not a known regexp operator
/ "GET/ { ... }
With both forms I get no warning message with my GNU awk version 4.2.
Post by Daniel Ajoy
https://github.com/soimort/translate-shell/issues/285
is confusing to me and makes be think that maybe I shouldn't, and that the issue will go away in a new gawk release.
First, it's a warning only. Second, if it hurts don't do it; you don't
need to escape the double-quote in static regexps with a backslash.

Janis
Post by Daniel Ajoy
Daniel
Aharon Robbins
2019-07-08 10:30:32 UTC
Permalink
Post by Daniel Ajoy
3. The regex routines have been replaced with those from GNULIB, allowing
me to stop carrying forward decades of changes against the original
ones from GLIBC.
This isn't related to the issue you are dealing with.
Post by Daniel Ajoy
Hello,
/ \"GET/ { ... }
warning: regexp escape sequence `\"' is not a known regexp operator
/ "GET/ { ... }
Yes.
Post by Daniel Ajoy
https://github.com/soimort/translate-shell/issues/285
is confusing to me and makes be think that maybe I shouldn't, and that
the issue will go away in a new gawk release.
The issue isn't going to go away in a future release. Change your code.

Thanks,

Arnold
--
Aharon (Arnold) Robbins arnold AT skeeve DOT com
Ed Morton
2019-07-08 13:37:35 UTC
Permalink
Post by Daniel Ajoy
3. The regex routines have been replaced with those from GNULIB, allowing
me to stop carrying forward decades of changes against the original
ones from GLIBC.
Hello,
/ \"GET/ { ... }
Are you trying to match on the string:

<blank>"GET

or:

<blank>\"GET

in your input?
Post by Daniel Ajoy
warning: regexp escape sequence `\"' is not a known regexp operator
Good. Your code has a bug in it and now you get a warning about it so
you can fix it.
Post by Daniel Ajoy
/ "GET/ { ... }
Depending on which of the above 2 strings you're trying to match the
code should be:

/ "GET/ { ... }

or:

/ \\"GET/ { ... }
Post by Daniel Ajoy
https://github.com/soimort/translate-shell/issues/285
is confusing to me and makes be think that maybe I shouldn't, and that the issue will go away in a new gawk release.
The warning is telling you about a bug in your code - the warning isn't
the issue, the bug is the issue.

Ed.
Post by Daniel Ajoy
Daniel
Loading...