I am trying to come up with a regex that matches this pattern but it is not working properly. It needs to parse a header file and matches functions calls that look like this:
STDMETHOD(CreateBitmap)(
D2D1_SIZE_U size,
_In_opt_ CONST void *srcData,
UINT32 pitch,
_In_ CONST D2D1_BITMAP_PROPERTIES *bitmapProperties,
_Outptr_ ID2D1Bitmap **bitmap
) PURE;
but the arguments are variable and can be none. So in essence will be a match for this:
STDMETHOD(SomeMethodName)(
... a bunch of stuff multiple lines...
.... or nothing.....
) PURE;
Anyone suggests me a regex that matches this pattern across the header file? It needs to handle multiple line for the arguments.
I tried this without success.
\bSTDMETHOD(\b(.*)\;