This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

problem with regexp ( )

Help for those learning Tcl or writing their own scripts.
Post Reply
U
UKN
Voice
Posts: 1
Joined: Tue Jul 25, 2006 10:57 am

problem with regexp ( )

Post by UKN »

hey i have found regexp today its very cool 8) but im stuck at 1 thing..

Code: Select all

regexp -all {([^a-z]\d{1,3})\s{1,2}(\d+x)\s(\W.\d+\w\W)\s(\w.+)(3cd|4cd|2cd|cd|vinyl|SBD|fm|promo|cdr)(.*)(.tar)} $text - pnum get size name type scene extentsion
The bot gives a error when trying to regexp this:
#1 7x [ 86M] The_Speed_Freak-Banging_Trash-(AA01)-Vinyl-2006-DEF.tar
[16:59] Tcl error [pubm:test]: can't read "pnum": no such variable
But when i try to add this one everything is right:
#1 7x [ 86M] DJ_Chokai-Live_At_Terror_FM_Live-SBD-15-07-2006-1REAL.tar
soo.. the problem has to be the (AA01)

but i don't know how to fix it :(

can someone help me with this? Thanks!!!
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Init the vars before the regexp, with like set pnum "";set get "";set size ""
and so on. The regexp is apparently not grabbing the data to set pnum. I would hazard a guess it's tripping up on the () in the string that you're trying to grab, so perhaps replacing $text with [split $text] to the regexp would help.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

This appears to be in relation to file sharing which is against forum policy and no assistance will be given.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Post Reply