[Gambas-user] RegExp: How to find all matches of a pattern (global match)?
Benoît Minisini
benoit.minisini at gambas-basic.org
Tue Aug 22 13:20:55 CEST 2023
Le 22/08/2023 à 00:29, T Lee Davidson a écrit :
> On 8/21/23 12:03, Jesus Guardon wrote:
>> The external parenthesis makes the group that captures all matches.
>> Don't forget to apply the "/gmi" modifiers, which stands for "global",
>> "multiline" and case "insensitive", if needed. See it working in my example:
>>
>> https://regex101.com/r/41vaTw/1
>
> Thank you for that pattern, Jesus. It is considerably shorter than the
> one I was using. But, it still doesn't work in Gambas as there is no
> Global Match compile option - at least not that I have found.
>
>
Hi,
The last commit
https://gitlab.com/gambas/gambas/-/commit/61bab1771efd4778ae0bccacdbfdede03c7fdb14
added a RegExp.FindAll() method.
You are welcome to try it and tell me if it behaves as you expected.
Thanks.
--
Benoît Minisini.
More information about the User
mailing list