RegExp.replace freezing

  • Thread starter Thread starter yoni
  • Start date Start date
Y

yoni

Hi,
I am trying to write a regexp to find all the code on the header of
entities in SQL Server (views, SPs, etc...) I got something like
this:

(.|\n)*((create view)|(create proc)|(create function)|(create
trigger))


does that means sense? I want all the code that's before the code
header. now, the problem is, when i give that pattern with some
string
buffer to the 'replace' method (I replace it with String.Empty...
meaning i want to remove the header) the whole enviroment just
freezes... the RegExp.Replace method never returns...


anybody has any idea why? or some different regexp that does the same
that may not hit that bug? (i assume its a bug) i am using .net 2.0


thanks
Jonathan
 
Hi,
I am trying to write a regexp to find all the code on the header of
entities in SQL Server (views, SPs, etc...) I got something like
this:

(.|\n)*((create view)|(create proc)|(create function)|(create
trigger))

does that means sense? I want all the code that's before the code
header. now, the problem is, when i give that pattern with some
string
buffer to the 'replace' method (I replace it with String.Empty...
meaning i want to remove the header) the whole enviroment just
freezes... the RegExp.Replace method never returns...

anybody has any idea why? or some different regexp that does the same
that may not hit that bug? (i assume its a bug) i am using .net 2.0

thanks
Jonathan

Can you replace with other patterns? Can you replace with something
other than String.Empty? Does the environment ever return?

Thanks,

Seth Rowe
 
Hey,
well, what i did is broke down all the 'or' into many different
expressions and then it does work... must be some bug in the
regexp .net code, it seems...

thanks for your help
 
Back
Top