Why does Mono locks up on regex -


This is line mono on Linux lock (I am using 2.6.4 VM distro on official site)

  var match = regesx Match (SJ, Link Pattern);  

The string is that which receives the link and title.

  var linkPattern = @ "& lt; \ ba \ b [^ \ & gt;] * \ bhref \ b * = \ b *" ([^ "\"] *) "" "[^ \ & Gt;] * \ btitle \ b * = \ b *" "([^" \ "gtc:] *) [^" "\ \ & Gt;] *" "" ;  

When Mono does not crash that line, throw exceptions or anything. Using the top I use mono 96% of the CPU. I do not know how long the string is for me & lt; 8kb (I tested a different URL) and I have run the code since a few minutes so that something is broken.

"Too many \ b 'was my first reaction but in fact:

\ b means the word boundary, in my opinion, and are identical Besides, \ b * will therefore be an "alternative recurrence of word boundaries", which seems misleading.

I think I have never used \ b is not used at all, and instead of \ s? or \ s * is used .

Do you have a different regex engine (Pearl, PHP) due to lockup mono to determine?


Comments