Python Forum

Full Version: How to search for a byte hex pattern with Joker in FIile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all

i am searching for a solution to parse a file for a byte pattern with jokers inside a file, and if found to print the position ,or if multiple times inside the starting position of that pattern.

e.g. i`d like to search for "ce xx xx 20 xx xx 4c xx xx ad xx xx c9 02" where xx represents the joker as these values may be different.
(Jun-03-2023, 05:01 AM)lastyle Wrote: [ -> ]i`d like to search for "ce xx xx 20 xx xx 4c xx xx ad xx xx c9 02" where xx represents the joker
Use regular expressions (the re module)