| |||
Using a List to create an entry in a regexp Posted by Graham_Tasker (Graham_Tasker), 30 March 2005 I have a list in the form of set commandListInteger list \ acmshNLines \ acmshMStep \ acmshTSle \ acmshTP \ acmshTPp \ acmshTLl \ acmshKOff \ acmshTSop \ acmshTOp and wish to convert it in into an entry in a switch -regexp command ie into some thing like switch -regexp -- $nextentry { ((acmshNLines|acmshMSteps|acmshTP|acmshTPp|acmshTLl|acmshKOff|acmshTOp)) {...} ......} this would allow me to produce a generic parser for setting up the command data for part of an intergration test system. it it possible and if so how?? Thanks Graham Tasker Posted by admin (Graham Ellis), 30 March 2005 Hi, Graham ... it's been a long day! I'm probably missing something vital here, but:% set sample [list tom dick harry george] tom dick harry george % set lookform [join $sample | ] tom|dick|harry|george This 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 |