Re: [libreoffice-users] REGEX difficulty

2021-05-21 Thread hymie
David Lynch writes: >On the other hand, if I enter =REGEX("29791","(?=(29|79|97))",,1) > >I get a zero length string. > >Can anyone help please? https://stackoverflow.com/questions/1570896/what-does-mean-in-a-regular-expression (?=pattern) is a zero-width positive lookahead assertion. For

Re: [libreoffice-users] REGEX difficulty

2021-05-21 Thread Tony Arnold
Hi David, On Fri, 2021-05-21 at 17:19 +0100, David Lynch wrote: > If I use the REGEX tester > with regular expression (?=(29|79|97)) > and test string 29791 > I get 3 matches 29, 97,79, as I expect. > On the other hand, if I enter =REGEX("29791","(?=(29|79|97))",,1) I

Re: [libreoffice-users] REGEX difficulty

2021-05-21 Thread Bo Siltberg
What flavour of regex are we talking about? Can you show us how you get three matches here. I can only see that there will be one match, 29, 79 or 97. Furthermore, if you intend to use this as a "lookahead", there is something missing in the regex, the prefix that shall be matched if it is

[libreoffice-users] REGEX difficulty

2021-05-21 Thread David Lynch
If I use the REGEX tester with regular expression (?=(29|79|97)) and test string 29791 I get 3 matches 29, 97,79, as I expect. On the other hand, if I enter =REGEX("29791","(?=(29|79|97))",,1) I get a zero length string. Can anyone help please? David Lynch Version: