cerberus_gr Halfop
Joined: 07 Feb 2003 Posts: 97 Location: 127.0.0.1
|
Posted: Thu Apr 01, 2004 7:08 am Post subject: Help about scan command |
|
|
Hello,
I have two sentences like:
| Code: |
good hello how are you.mp3 ::MORE:: 1.2KB 32/44 Mono [43s]
bad I_am_fine_thank_you.mp3 ::MORE:: 3.4MB 112/44 Stereo [3m32s]
|
(space between .mp3 and :: is <SPACE><CHAR 160>*<CHAR 160><SPACE>
and that's I want is to set in some variables some values, for the line 2:
| Code: |
set id "bad"
set file "I_am_fine_thank_you.mp3" (Not the spaces and chars 160)
set size "3.4MB"
set bit "112"
set time 3m32s
|
I have written this code:
| Code: |
scan $line %s%\[^[format %c 160]\]::MORE::%s%d%s nick file size quality length
set file [lrange $file 0 end]; # in order to remove the spaces in the front and the back
set bit [string trimleft $bit]
# I can set the length as 3m32s and if I use:
# scan $line %s%\[^[format %c 160]\]::MORE::%s%d%s[b]%s[/b] nick file size quality tmp length
# it doesn't work :(
|
Please help |
|