[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hexl-mode: searching for multi byte sequence?
From: |
Stephen J. Turnbull |
Subject: |
hexl-mode: searching for multi byte sequence? |
Date: |
Tue, 14 Jul 2015 16:07:47 +0900 |
Alfred M. Szmidt writes:
> Is there some way in hexl-mode to search for a (hex, octal, ...) byte
> sequence? Currently, C-s behaves a bit strange in at least two regards:
>
> 1) If file contains the byte sequence #xDEADBEAF, depending on how
> they are aligned (odd or even word), one has to look for "DEAD
> BEAF" and "DE ADBE AF".
C-u C-s de\(.\n\)*ad\(.\|\n\)*be\(.\|\n\)*af
is what I'd use. It has obvious defects, and it would be nice if
hexl-mode provided something a little less greedy (eg a transformation
to a 3-armed disjunction allowing at most one newline plus handling
the leading byte number after the newline).