file size

Dick Kriesel dick.kriesel at mail.com
Tue Sep 23 21:47:22 EDT 2014


On Sep 23, 2014, at 1:13 AM, Thierry Douez <th.douez at gmail.com> wrote:

> Here is a modified version of yours:
> 
> matchText(the detailed files,("(?m)^" & urlEncode( tFile ) & ",(\d+)" ), tSize)


Hi, Thierry.

When the file name contains a space, urlEncode encodes the space as +, which regex interprets, causing the match to fail and tSize to be empty.  The \Q...\E causes regex to see everything enclosed as a literal, including the +, so the match succeeds and tSize is correct.

Glad you like it.

-- Dick



More information about the use-livecode mailing list