lex __ wrote:
> background: I'm trying to create a 'intelligent' source-code security
> analysis tool for c/c++ , python and php files, but filtering the
> comments seems to be the biggest problem. :(
for C/C++, why not just use "gcc -E source.c" (or equivalent), and use
the line markers to
On 2007-12-21, lex __ <[EMAIL PROTECTED]> wrote:
> I'm tryin to use regexp to replace multi-line c-style comments
> (like /* this /n */ ) with /n (newlines). I tried someting
> like re.sub('/\*(.*)/\*' , '/n' , file) but it doesn't
> work for multiple lines.
>
> besides that I want to keep a
Steven D'Aprano wrote:
> On Fri, 21 Dec 2007 00:00:47 +, lex __ wrote:
>
>> I'm tryin to use regexp to replace multi-line c-style comments (like /*
>> this /n */ ) with /n (newlines). I tried someting like
>> re.sub('/\*(.*)/\*' , '/n' , file) but it doesn't work for multiple
>> lines.
On Fri, 21 Dec 2007 00:00:47 +, lex __ wrote:
> I'm tryin to use regexp to replace multi-line c-style comments (like /*
> this /n */ ) with /n (newlines). I tried someting like
> re.sub('/\*(.*)/\*' , '/n' , file) but it doesn't work for multiple
> lines.
Regexes won't cross line boun