in reply to Re^2: Perl regex limitations (32k)
in thread Perl regex limitations
The match is never made however... The code I'm matching against is a C++ header file, and I'm looking for class definitions, formatted like this :$braces = qr/(?<braces>\{ ([^\{\}]++ | (?&braces))*+ \} )/x; if ($h =~ s/class \s+ (?<class_name> \w+) \s* (\: (\s* \w*)? \s* (?<an +cestor> \w+))? \s* $braces//x) { print "hi\n"; }
This expression works fine for smaller classes or for this same problem class if there are no braces inside the class definition. In this class however, I have the following declarations (C++ Builder code...) :class MyClassName : public MyAncestorClass { ... ... };
If I remove that property declaration, it matches, if I leave it, it fails... Jonathan__property TNotifyEvent OnMonaDocSaveToDB = {read=FOnMonaDocSaveToDB +, write=FOnMonaDocSaveToDB};
|
|---|