In my current project I could really use a built-in function for templates and/or scripts to test whether a byte sequence (beginning at a specified offset in the current file, with an optional maximum length) matches an arbitrary pattern.
If you think this might be practical to add to 010 Editor, I think it would be a very powerful feature–even if it didn’t provide all the capabilities that the more powerful regular expression engines are capable of–such as capturing and replacement.
010 Editor supports regular expressions and also supports wildcard matches with ‘*’ and ‘?’ for a simpler way of matching. You should be able to use FindFirst/FindAll to check if a sequence is at the beginning of a file. You can also use the RegExMatch function to check if a byte sequence matches a certain regular expression.
The Oniguruma regex library has support for retrieving the matches for named or anonymous (numbered) capture groups. 010 Editor’s Find commands in Regex mode support these, too, and allows their use in replacement strings.
A nice enhancement to the functionality of FindAll(), would be to allow retrieval of capture groups that matched. Perhaps the struct TFindResults could be expanded to include fields for them.