replaceText() not working as expected for multiple lines

Dr. Hawkins dochawk at gmail.com
Sat Sep 20 16:05:40 EDT 2014


I have a variable with:

/Users/hawk/bk_clients/blue aardvark/blue_aardvark____001.dhbk
/Users/hawk/bk_clients/pink panther/pink_panther_____001.dhbk
/Users/hawk/bk_clients/super chicken/super_chicken____005.dhbk
/Users/hawk/bk_clients/test5/test5____________001.dhbk

which was obtained with a shell command and ls on OSX

Using replaceText() to replace ^/Users/hawk/bk_clients/ with empty, I get

blue aardvark/blue_aardvark____001.dhbk
/Users/hawk/bk_clients/pink panther/pink_panther_____001.dhbk
/Users/hawk/bk_clients/super chicken/super_chicken____005.dhbk
/Users/hawk/bk_clients/test5/test5____________001.dhbk

That is, the ^ is only being applied to the variable as a whole, rather
than to each line.

Does this have to do with how livecode and OSX delimit lines?

-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462



More information about the use-livecode mailing list