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.
Help for those learning Tcl or writing their own scripts.
-
pestywesty
- Voice
- Posts: 1
- Joined: Sat Oct 21, 2006 7:24 am
Post
by pestywesty »
Lets say I have a variable $var
$var == <td align="center">13 October 06</td>"
How can I go about manipulating $var such that I get only "13 October 06" out of the code?
-
rosc2112
- Revered One
- Posts: 1454
- Joined: Sun Feb 19, 2006 8:36 pm
- Location: Northeast Pennsylvania
Post
by rosc2112 »
Either with string map or regsub:
regsub -all {<td.*?>} $var {} var
regsub -all {</td>} $var {} var
or
set var [string map {"<td align=\"center\">" "" "</td>" ""} $var]