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.

Regex help

Help for those learning Tcl or writing their own scripts.
Post Reply
R
Red_Rooste5
Voice
Posts: 37
Joined: Sat Oct 21, 2006 7:43 am

Regex help

Post by Red_Rooste5 »

Ok I need the number one into $clannumber and the The_Death_Squad into $clanname

How do I do that when there's only one line of text?

<br>Red_Rooste5
<br>1
<br>The_Death_Squad http://www.runehead.com/clans/ml.php?clan=deathsquad

~Red_Rooste5
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Code: Select all

regexp {<br>.*?<br>(.*?)<br>(.*?)http.*?} $line match clannumber clanname
$line is the input line, and the items in () in the regex string are the bits that will be put into the variables clannumber and clanname.
R
Red_Rooste5
Voice
Posts: 37
Joined: Sat Oct 21, 2006 7:43 am

Post by Red_Rooste5 »

Thanks man :D
Post Reply