mIRC Home    About    Download    Register    News    Help

Print Thread
removing a string from string #81245 29/04/04 04:13 PM
Joined: Feb 2004
Posts: 19
X
xyz Offline OP
Pikka bird
OP Offline
Pikka bird
X
Joined: Feb 2004
Posts: 19
Hell everyone,
is there a command to use when I would like to remove everything from a string from position A to position B?
For example: c:\foo\bar.txt - remove 7-14 and 1-3 = foo
and so on..

Tried to lookup this stuff with search here but couldn't find suitable stuff, maybe I just don't know the right terms to use when searching.

Thanks, peace.

Re: removing a string from string #81246 29/04/04 04:22 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
$mid(c:\foo\bar.txt,4,3) will get foo.

you could also use: $gettok(c:\foo\bar.txt,2,$asc(\))


New username: hixxy
Re: removing a string from string #81247 29/04/04 08:36 PM
Joined: Feb 2004
Posts: 19
X
xyz Offline OP
Pikka bird
OP Offline
Pikka bird
X
Joined: Feb 2004
Posts: 19
Thanks dude!

Re: removing a string from string #81248 29/04/04 08:42 PM
Joined: Aug 2003
Posts: 325
W
Wolfie Offline
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
What exactly are you trying to do? $mid is useful, however, depending on what you are trying to do, there might be other options that will do the work for you where you might be doing it the long way, such as directory/file parsing.