Date: prev next · Thread: first prev next last
2021 Archives by date, by thread · List index


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 example,
/\w+(?=\t)/ matches a word followed by a tab, without including the tab.

So it looks to me like you are trying to match nothing followed by a 29,
and you are successfully matching nothing.

=REGEX("29791","((78|87))",,1)   tells me "#N/A" , which I suppose is
what you get when a regex fails.  Yours succeeds and returns an empty
string.

--hymie!             http://nasalinux.net/~hymie            hymie@nasalinux.net

-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.