ITADN

`ifRegex.split()` returning `roArray` instead of `roList`

#717Openluis-j-soares 创建于 2025-10-30
bugBrightScript
L
luis-j-soarescommented
https://developer.roku.com/en-gb/docs/references/brightscript/interfaces/ifregex.md#splitstr-as-string-as-object > **Return Value** > An roList of substrings of str that were separated by strings which match the pattern in the CreateObject call. The separator strings are not returned. If no matches were found, the returned list contains a single item with the string unchanged. > > Examples from Brightscript Debugger Interactive Shell > >> r = CreateObject("roRegex", ",", "") ' split on comma >> ? r.Split("first, second, third and fourth") >> first >> second >> third and fourth >> r = CreateObject("roRegex", "/+", "") ' split on one or more slashes >> ? r.Split("example.com/images///2012/cat.jpg") >> example.com >> images >> 2012 >> cat.jpg Simulator: <img width="522" height="159" alt="Image" src="https://github.com/user-attachments/assets/eb4a825a-7a9a-4988-9453-95421892bf8c" /> Device (OS 15.0.4): <img width="565" height="207" alt="Image" src="https://github.com/user-attachments/assets/c0dc7b20-8544-468e-a08d-41dc191d9738" />
0 条评论