Extract segments of an array
Hi,
Am Sat, 6 Feb 2021 16:42:22 -0800 (PST) schrieb Tatsujin:
I changed the mysort() array to this:
mysort(1) = "apple"
mysort(2) = "apricot"
mysort(3) = "baby"
mysort(4) = "banana"
mysort(5) = "bar"
mysort(6) = "fit"
When I use the search pattern of "a", it sets myarray to this:
myarray = ["apple", "apricot", "aby", "anana"].
sorry, my bad.
to find the "a" at the beginning of the word you have to insert \bin
front of the pattern:
ptrn = "\ba[a-z]{1,}"
Regards
Claus B.
--
Windows10
Microsoft 365 for business
|