I've been trying to get BC4 to ignore accumulated BOM at the front of a text file but can't seem to find the right regular expression magic.
I have UTF-16 text files in a build that accumulate UTF-16LE Byte Order Markers (BOM) at the front of the file due to a bug in a tool. A new raw file has a BOM pair, 0xFF, 0xFE, at the beginning of the file but due to the bug an additional pair or two may get added each time the file is processed. While we get the vendor to fix the tool, I'd like to create a file format/grammar for these files that ignores the accumulated BOM.
An education/suggestions on regular expressions involving one or more pair of hex bytes and \x would be greatly appreciated
I have UTF-16 text files in a build that accumulate UTF-16LE Byte Order Markers (BOM) at the front of the file due to a bug in a tool. A new raw file has a BOM pair, 0xFF, 0xFE, at the beginning of the file but due to the bug an additional pair or two may get added each time the file is processed. While we get the vendor to fix the tool, I'd like to create a file format/grammar for these files that ignores the accumulated BOM.
An education/suggestions on regular expressions involving one or more pair of hex bytes and \x would be greatly appreciated
Comment