GtkSourceView <-> Gedit: regex matching discrepancy - is it a bug?

It’s been a long time since I looked at that code, but I presume it has to do with the syntax engine being line based. So trying to match across multiple lines would break that. Although there may have been a hack to work around that with additional contexts, but I’m not up to date on how the engine gets abused.

Where as the search engine does not need to maintain sub-contexts, and therefore has no such limitation.