I can assure you it was all necessary to get it to work. I was once writing an article that explained fully how the whole regex strings worked, but I’m holding off of that whilst ReMarkable is still being developed--plus it takes time and I don’t have that.
You think you have it hard, I hear someone is trying to port it to perl! :)
I should write a conformance suite so that people making ports can ensure that the code is correct but I am so cripplingly busy with work. At the moment, camen design is my conformance suite, if my website doesn’t publish, there’s a bug. :P
If you need any help understanding the internals of ReMarkable and its regex, just ask, I’d be happy to explain any particular part.