mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
That works almost perfectly, jaytea. It doesn't remove & nbsp;, but it does make the line look right. I can more easily handle those non-breaking spaces than the other, even right within the identifier. It is all working great now. Thanks.

Mpdreamz, as you said yourself, it affects performance to jump into COM for something so minor as HTML removal. I do use COM in other scripts, but it's used in cases where there really isn't a better option to get the information that it provides (such as system or Windows information). That said, a DLL would probably still be better in those cases, but I understand COM... I don't really want to try to figure out how to write DLLs right now.

Also, as genius_at_work said, this problem for me gives the option to try and fix the often-used $htmlfree/$nohtml identifiers so they work in more situations. It's much easier for someone to use a widely used HTML removal identifier than to try and find a COM script that does exactly what they need. I admit I wasn't trying to fix it for anyone else, but it's not a bad idea to do so.

So I wasn't ignoring your suggestion. I just felt that I could have less of a performance problem using other methods. I didn't benchmark yours versus others, so maybe it isn't slower than other methods... it just seems like it would be.


Invision Support
#Invision on irc.irchighway.net
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
Hehe i havent done any benchmarking myself but i doubt the endresult will be slower then the equivalent regex call. Which is not the one that jaytea posted which needs balanced brackets. Like i mentioned in my post PCRE recursion could get you there halfway. But then thats PCRE's awesomeness overcomming some Turing Completeness issues with regex.

If someone gets it working for nested tags and unbalanced (which they wont) i'll take up the challange with the COM solution.

Regex does not equal fast per se definatly not complex ones like the one is needed here, much like COM which doesnt have to be slow per se. Replying here makes me very curious how fast/slow the com approach will be so i'll do some benchmarking tomorrow laugh

Not to say an updated $htmlfree which handles nested balanced tags however wrong though is a bad thing :P (oxymoron ?)(Alias should really be called $striphtml or something btw come to think of it).

Glad jaytea's solution works for you smile



Last edited by Mpdreamz; 21/02/09 06:46 PM.

$maybe
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Page 2 of 2 1 2

Link Copied to Clipboard