Hi,
this is a strange one.
The example code for reproduction.
Code: Select all
$paths = <<<PATHS
C:\parent\child\grandchild\1.5.658.3\test.html
C:\parent\child\grandchild\1.5.658.21\test.html
C:\parent\child\grandchild\1.5.658.1\test.html
PATHS;
$versions = regexmatches($paths, "\d\.\d\.\d{1,3}\.\d{1,3}", <crlf>);
// sort
$versions = formatlist($versions, "s", <crlf>); ***** ISSUE LINE *****
$newVersion = gettoken($versions, 1, <crlf>);
// msg($newVersion, 1);
$match = "<" . regexmatches($paths, "$newVersion.*$") . ">";
copytext($match);
msg($match);With format "s"
Code: Select all
$versions = formatlist($versions, "s", <crlf>);Code: Select all
<1.5.658.1\test.html>Code: Select all
$versions = formatlist($versions, "n", <crlf>);Code: Select all
<1.5.658.1\test.html>Code: Select all
$versions = formatlist($versions, "r", <crlf>);Code: Select all
<1.5.658.3\test.html
>FH
XYplorer Beta Club