Old posts that have not been replied to for several years.
-
NewzUK
- Master
- Posts: 200
- Joined: Mon Nov 18, 2002 3:10 am
- Location: Auckland, New Zealand
-
Contact:
Post
by NewzUK »
Hi
The line of text I'm trying to identify with string match has the asterisk symbol * in it, but:
if {[string match *** $var]} {
dosn't work (I guess because it's using it like a wildcard?). Is there a way I can make it recognise the * ?
Thanks.
-
strikelight
- Owner
- Posts: 708
- Joined: Mon Oct 07, 2002 10:39 am
-
Contact:
Post
by strikelight »
escape the * you are interested in...
ie.
Code: Select all
if {[string match {*\**} $var]} { ... }
-
NewzUK
- Master
- Posts: 200
- Joined: Mon Nov 18, 2002 3:10 am
- Location: Auckland, New Zealand
-
Contact:
Post
by NewzUK »
great thanks strike - working well!