lsearch -inline -regexp {-gin=in.csv -gout=out.csv} -gin=(.+)
Reports
-gin=vst.csv
I guess it is not possible with lsearch to have the matching (.+) only reported?
Currently I use another line of regexp to get the text after = into a variable.
--
Svenn
"Svenn Are Bjerkem" <svenn....@googlemail.com> wrote in message
news:cdd700fa-32d3-4f2c...@glegroupsg2000goo.googlegroups.com...
lsearch is finding list elements which match a pattern. Your first (real)
argument is the list, with two elements (gin and gout). The pattern matches
the first element, and that is returned inline (otherwise, it would return
the index - "0").
Dependening on what your list looks like, you might be able to use:
regexp -- {-gin=(.+) } {-gin=in.csv -gout=out.csv} -> match
(note: I added a space after ".+" because .+ matches everything)
"match" should have "in.csv". (the whole -gin=in.cvs goes into a variable
named "->")
If your list is very complicated (with escapes), you are probably better off
with your two step process (lsearch followed by regexp).
Hope that helps!
Ned