about regex: I couldn't understand why it takes 2-10 minutes? [modified]
-
I used below project source code to make MHT, http://www.codeproject.com/KB/files/MhtBuilder.aspx[^] Below strings are problem. 1: "<link[^>]+?href\s*=\s*(?('|"")*(?[^'"">]+)('|"")*)" 2: "<i*frame[^>]+?src\s*=\s*(?['""]{0,1}(?[^'""\\>]+)['""]{0,1})" 3: "(?@import\s|\S+-image:|background:)\s*?(url)*['""(]{1,2}" & _ "(?!http)\s*/(?[^""')]+)['"")]{1,2}" In some links it takes between 2 and 10 minutes. it usually happens in external links. WHY? Thanx...
I want to fly but I don't have wings
modified on Wednesday, August 6, 2008 6:44 AM
-
I used below project source code to make MHT, http://www.codeproject.com/KB/files/MhtBuilder.aspx[^] Below strings are problem. 1: "<link[^>]+?href\s*=\s*(?('|"")*(?[^'"">]+)('|"")*)" 2: "<i*frame[^>]+?src\s*=\s*(?['""]{0,1}(?[^'""\\>]+)['""]{0,1})" 3: "(?@import\s|\S+-image:|background:)\s*?(url)*['""(]{1,2}" & _ "(?!http)\s*/(?[^""')]+)['"")]{1,2}" In some links it takes between 2 and 10 minutes. it usually happens in external links. WHY? Thanx...
I want to fly but I don't have wings
modified on Wednesday, August 6, 2008 6:44 AM
I don't know, but I suspect the doubled-quotes, try
\"
instead. For getting hrefs I use:"href\\s*=\\s*(?'quot'[\"'])(?'href'.*?)((?'sep'#)(?'id'.*?))?\\k'quot'"
-
I don't know, but I suspect the doubled-quotes, try
\"
instead. For getting hrefs I use:"href\\s*=\\s*(?'quot'[\"'])(?'href'.*?)((?'sep'#)(?'id'.*?))?\\k'quot'"
thanx your reply, vb mht code is works true but the problem is performance. Sometimes it's too slow, horrible. it takes between 2 and 10 minutes. Now I'm using SerachAroo's classes for getting local and external links. It works very good and fast. I changed the code little bit. After foound the local and external links I can find coordinates of these links with another code(the code is superman :) :) :)) After that I will add Uri.Host at the coordinates. I did it,it works very very fast but I have some problems. External link works but local links doesn't work on clik's . :) By the way I try to make single html, not mht Now I try to fix it... Do yuo have any idea?
I want to fly but I don't have wings
modified on Wednesday, August 6, 2008 3:38 AM
-
I don't know, but I suspect the doubled-quotes, try
\"
instead. For getting hrefs I use:"href\\s*=\\s*(?'quot'[\"'])(?'href'.*?)((?'sep'#)(?'id'.*?))?\\k'quot'"