Gramps uses the Python version of regular expressions re — Regular expression operations — Python 3.10.2 documentation
I could not find any reference to suggest that it follows any of the POSIX levels, although for the usage of our filters I suspect that this doesn’t matter.
I think that for the vast majority of likely re used in Gramps, the relatively minor variations in syntax just doesn’t matter. I suppose that a very advanced user might be able to find some expression where it does; but I also suspect that user could read the Python docs to get the details.
Note in the documentation that the Python version of re has changed over time, usually in a backward compatible fashion. So the actual syntax of Gramps would be that of the version of Python that you have installed to run Gramps.