0

C/C++ の複数行プリプロセッサ マクロに一致するように perl 正規表現を書きたいと考えています。私が思いついた

\#([\W\w\s\d])*?(\n.*?\\\\)*\n

しかし、うまくいきません。

#define protected_call(_name, _obj, _method, _args...) \
try { \
    (_obj)->_method(_args); \
} \
catch (exception &e) { \
   ereport(ERROR, \
          errmsg("Error calling %s() in User Function %s at [%s:%d], error code: %d, message: %s", \
                    #_method, (_name), e.filename, e.lineno, e.errorcode, e.what()))); \
} \

catch (...) { \
   ereport(errmsg("Unexpected exception calling %s() User Function in %s", \
                    #_method, (_udsfname)))); \
}
4

2 に答える 2

2
于 2013-06-14T15:32:38.317 に答える