On Nov 11, 11:04am, Wolfgang Kinscher wrote:
...
> input _l <!_job
> if str(_l,1,1) = '!' then
> setvar _l '!' + _l
> endif
This code doubles the ! if it is the 1st character in _l
You could also use the repl() function as:
if lft(_l,1) = '!' then
setvar _l repl(_l,'!','!!',1)
endif
This is not "better", I just wanted to point out that repl() exists
and could be useful for doubling CI metacharacters in lines that
you may be echoing to a file.
Jeff Vance, CSY
--