Skip to content
General IRCX

urgent code

A TG007 community discussion started by Angelia.

Discussion 6 posts
Page 1 of 1
Open
Topic #6662 · 6 published posts · 2,245 views

can anyone make me a snippet that removes every second character from a text document starting from the first character?

-h-e-l-l-o- -t-h-e-r-e

 

i got a corrupted file that has added an extra character every second character. i'd use $remove but it's a space so that doesnt really help

People are like slinkies; they're generally boring until you push them down stairs

when you say it has a space do you mean that it's a space where the -'s are like

 

h e l l o t h e r e and is there a double space between words or just a single space.

yeah, there's a space between each chatacter, as well as around each space, so it's quite literally where i've put the dashes (there's a space between each character and the original spaces have become 3 spaces)

Edited May 18, 2006 7:51 PM by Angelia

People are like slinkies; they're generally boring until you push them down stairs

you could try something like $remove($replace($replace(%text,$chr(32),-),--,$chr(32)),-)

 

close but it removes all spaces because it would be three dashes in a row, not two. i tried 3 too but that didnt work either - mirc takes the 3 spaces as 1 space then processes the result

Edited May 18, 2006 8:30 PM by Angelia

People are like slinkies; they're generally boring until you push them down stairs

not if you put the text in a var

 

 

 

 

here is what i used.. same as code i put up ( changed it to --- ) used %test instead of %text

post-1-1147984838_thumb.jpg

Edited May 18, 2006 8:33 PM by err0r
Attachments 1 file