Advanced Search
Mail us
Home    Manuel    Links    Faq     Some examples tcl/tk codes     Man of Bwidget with screenshot     Man of blt with screenshot


NAME

lsearch - See if a list contains a particular element

SYNOPSIS

lsearch ?mode? list pattern

DESCRIPTION

This command searches the elements of list to see if one of them matches pattern. If so, the command returns the index of the first matching element. If not, the command returns -1. The mode argument indicates how the elements of the list are to be matched against pattern and it must have one of the following values:

-exact
The list element must contain exactly the same string as pattern.

-glob
Pattern is a glob-style pattern which is matched against each list element using the same rules as the string match command.

-regexp
Pattern is treated as a regular expression and matched against each list element using the rules described in the re_syntax reference page.

If mode is omitted then it defaults to -glob.

KEYWORDS

list, match, pattern, regular expression, search, string
Copyright © 1993 The Regents of the University of California.
Copyright © 1994-1996 Sun Microsystems, Inc.
Copyright © 1995-1997 Roger E. Critchlow Jr.
Erreur (1146) : Table 'tcltk.tcltksamplemancode' doesn't exist

Add a code sample :


Please enter your name and your email ( the I could thank's you ). Don't enter html code in the text area If you have any problem email me at this adress vidalc@club-internet.fr
 Your name    
 Your email    
 Your example