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.
ProXy
Op
Posts: 126 Joined: Sun Aug 11, 2002 3:09 pm
Post
by ProXy » Wed Feb 05, 2003 9:35 am
Hi all,
I have a var that contains the content of a website, and ich want to pick out a specific part of this conent and save it to a new var.
Code: Select all
regexp {^.*Stream Title: </font></td><td><font class=default><b>(.*)</b>.*} $streamdata streamdata streamname
This not only saves the String but also the content below </b>. Does anyone know what`s the error?
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Wed Feb 05, 2003 11:18 am
ermm...
I think it is regsub you want to use.. not regexp
regsub - Perform substitutions based on regular expression pattern matching
SYNTAX: regsub ?switches? exp string subSpec ?varName?
Elen sila lúmenn' omentielvo
ProXy
Op
Posts: 126 Joined: Sun Aug 11, 2002 3:09 pm
Post
by ProXy » Wed Feb 05, 2003 11:24 am
I want to catch all between the bold tags and save this to a new var. I have a second line in my TCL, but this line works:
Code: Select all
regexp {^.*Stream Status: </font></td><td><font class=default><b>Stream is up at (.*) kbps with <B>(.*) of (.*) listeners \((.*) unique\).*} $streamdata streamdata streamkbps streamlisteners streammaxlisteners streamuniquelisteners
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Wed Feb 05, 2003 11:36 am
Use the scan command rather than regexp.