excluding search string in regular expressions

Franz Steinhaeusler franz.steinhaeusler at utanet.at
Thu Oct 21 09:12:49 EDT 2004


On Thu, 21 Oct 2004 14:40:24 +0200, "Mitja" <nun at example.com> wrote:

>Franz Steinhaeusler wrote:
>> On Thu, 21 Oct 2004 13:36:46 +0200, Franz Steinhaeusler
>> <franz.steinhaeusler at utanet.at> wrote:
>>
>>>
>>> single characters with [^ab] but I need not(ab)
>>>
>>> not_this_brace_pattern(\*\*/\n).*::
>>
>> Sorry,
>> is this the solution (simple concatenating
>> [^*][^*][^/]\n.*:: ?
>
>That should do, though it's admittedly far from elegant; I, too, would like to see a nicer solution.
>
>> The background:
>> I want to scan cpp file, whether the have a doxygen
>> comment already: It should find all postitions, where
>> this is missing:
>>
>> ok
>>
>> doxygen comment
>> **/
>> void CBs::InitButtonPanel (int progn1, int progn2)
>
>In this case, I'd replace \n with \w*, meaning any amount of whitespace.
>

Hello, thank you.

Oh, not really right (about finding c function/method definition):

[^*][^*][^/]\w*.*[)]*[^;]


if func()
{

would also be found.

A more common solution for detecting functions/Methods would be fine.

[^*][^*][^/]\w*--c-method/function/definition


-- 
Franz Steinhaeusler



More information about the Python-list mailing list