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.
Old posts that have not been replied to for several years.
t3ch^
Voice
Posts: 16 Joined: Sat Dec 27, 2003 7:19 pm
Post
by t3ch^ » Wed Jan 21, 2004 8:41 am
I got this code
Code: Select all
<a href="/Sections/Genres/Fantasy/">Fantasy</a> / <a href="/Sections/Genres/Adventure/">Adventure</a> / <a href="/Sections/Genres/Action/">Action</a>
This can vary in number and genres but the code is still the same.
How would i fetch all betwean > < ?
i figured somthing like this
Code: Select all
foreach [regexp -nocase {<a href=\"/Sections/Genres/[a-z]*/\">([a-z]*)</a>} $string string match] $string {
puthelp "NOTICE $nick :$match"
}
with this i get, in this case
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Wed Jan 21, 2004 3:54 pm
Check out the -all and -inline options (
http://tcl.tk/man/tcl8.4/TclCmd/regexp.htm ) and make sure you know how they work before writing the loop (you can't avoid reporting the entire match, so you need a variable for that value which will be discarded in most cases)
Have you ever read "The Manual"?