| View previous topic :: View next topic |
| Author |
Message |
pestywesty Voice
Joined: 21 Oct 2006 Posts: 1
|
Posted: Sat Oct 21, 2006 7:27 am Post subject: Help with deleting words |
|
|
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? |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Sat Oct 21, 2006 9:37 am Post subject: |
|
|
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] |
|
| Back to top |
|
 |
|