/ Check-in [d9d4c2b3bc]
DEMO | DOWNLOAD | DEPLOY | SEARCH
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:String.match, further fix.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d9d4c2b3bc5eac088be83723cc60c15526ecf639
User & Date: pmacdona 2019-05-15 04:01:41
Context
2019-05-16
14:58
Fix Jsi_GetBool to fail if empty string. wsdemo.jsi: client demo fix. check-in: 04eb7ce14f user: pmacdona tags: trunk
2019-05-15
04:01
String.match, further fix. check-in: d9d4c2b3bc user: pmacdona tags: trunk
01:38
Release "2.8.28". Fix String.match() to not force /g always on. check-in: 2c45c82274 user: pmacdona tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/jsiRegexp.c.

229
230
231
232
233
234
235


236
237
238
239
240
241
242
    
            Jsi_Value *val = Jsi_ValueMakeString(interp, NULL, 
                jsi_SubstrDup(str, pos[i].rm_so, pos[i].rm_eo - pos[i].rm_so));
            if (ofs)
                *ofs = pos[i].rm_eo;
            Jsi_ValueInsertArray(interp, ret, num_matches, val, 0);
            num_matches++;


        }
        if (num_matches && match && !isglob)
            return JSI_OK;
        if (num_matches == 1 && (ofs || !isglob))
            break;
        
        str += pos[0].rm_eo;







>
>







229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
    
            Jsi_Value *val = Jsi_ValueMakeString(interp, NULL, 
                jsi_SubstrDup(str, pos[i].rm_so, pos[i].rm_eo - pos[i].rm_so));
            if (ofs)
                *ofs = pos[i].rm_eo;
            Jsi_ValueInsertArray(interp, ret, num_matches, val, 0);
            num_matches++;
            if ( match && isglob)
                break;
        }
        if (num_matches && match && !isglob)
            return JSI_OK;
        if (num_matches == 1 && (ofs || !isglob))
            break;
        
        str += pos[0].rm_eo;