bug#32704: Can grep search for a line feed and a null character at the same time?

2018-09-15 Thread Eric Blake
On 9/15/18 11:43 AM, 21na...@gmail.com wrote: Thank you for your messages. It is possible I did not understand correctly your messages, because grep finds hex sequences with the “-Pa” options at least. grep -P introduces a completely different regex engine, with its own quirks. As such, it

bug#32704: Can grep search for a line feed and a null character at the same time?

2018-09-15 Thread 21naown
Thank you for your messages. It is possible I did not understand correctly your messages, because grep finds hex sequences with the “-Pa” options at least. Examples—“input.txt” contains, from the file system, for example “\xFF\xFE\x0D\x00\x0A\x00\x74\x00\x65\x00\x73\x00\x74\x00\x0D\x00\x0A\x0

bug#32704: Can grep search for a line feed and a null character at the same time?

2018-09-15 Thread 21naown
Le 15/09/2018 à 19:06, Eric Blake a écrit : On 9/15/18 11:43 AM, 21na...@gmail.com wrote: Thank you for your messages. It is possible I did not understand correctly your messages, because grep finds hex sequences with the “-Pa” options at least. grep -P introduces a completely different rege

bug#32704: Can grep search for a line feed and a null character at the same time?

2018-09-15 Thread Assaf Gordon
Hello, On 15/09/18 11:57 AM, 21na...@gmail.com wrote: Le 15/09/2018 à 19:06, Eric Blake a écrit : On 9/15/18 11:43 AM, 21na...@gmail.com wrote: But is it at least possible to find “\x0A\x00” with grep? If you bend the rules by throwing -P into the mix, yes :) So it is possible to find “\x0A

bug#32704: Can grep search for a line feed and a null character at the same time?

2018-09-15 Thread Eric Blake
On 9/15/18 12:57 PM, 21na...@gmail.com wrote: But is it at least possible to find “\x0A\x00” with grep? If you bend the rules by throwing -P into the mix, yes :) So it is possible to find “\x0A\x00” alone, but for example “\x74\x00\x0D\x00\x0A\x00\x74\x00\x65\00” is impossible to find with t