egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Another regexp that ain`t working :-/

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
overfly
Voice


Joined: 07 Jan 2005
Posts: 8

PostPosted: Sun Feb 12, 2006 6:31 am    Post subject: Another regexp that ain`t working :-/ Reply with quote

Hi everybody out there. I pharse a html Page with the following html Code:

Quote:
<div class="deat"><div class="thl">Test1</div><table width="100%"><tr><td class="time">Test2</td><td class="hl">Test3</td></tr></table>
<div class="txt">Test4</div></div>
<div class="deat"><div class="thl">Test1</div><table width="100%"><tr><td class="time">Test2</td><td class="hl">Test3</td></tr></table>
<div class="txt">Test4</div></div>
<div class="deat"><div class="thl">Test1</div><table width="100%"><tr><td class="time">Test2</td><td class="hl">Test3</td></tr></table>
<div class="txt">Test4</div></div>


Now i have in my tcl following code:
Quote:
regexp {<div class="deat"><div class="thl">(.*)</div><table width="100%"><tr><td class="time">(.*)</td><td class="hl">(.*)</td></tr></table>} $content . time1 time2 time3
regexp{<div class="txt">(.*)</div></div>} $content . main1


The thing is, that i need this working, only for the first 2 Lines :-/
After 48hours of showing me that i have to learn a lot more of tcl i need your help.
THX
Greetz
overfly
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Feb 12, 2006 10:44 am    Post subject: Reply with quote

If $content is a list, then use [lindex $content 0] and [lindex $content 1] for the 1st and 2nd lines.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber