| ||||
searching a string for .co.nz tcl/tk Posted by Duey (Duey), 27 February 2003 HiI want to search a string to see if it has .co.nz in it how would i do this? Posted by admin (Graham Ellis), 27 February 2003 I would use a regular expression match - the following line looks in an array element for the string you want:if {[regexp {\.co\.nz} $form(haystack)]} { I've put this up for you to try at: http://www.wellho.net/cgi-bin/demo/isitnz.tcl Full code of example: Code:
Posted by Duey (Duey), 28 February 2003 thanks manThis page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
| ||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |